import java.io.*;
import java.util.*;
import java.math.*;

public class cubics_ab implements Runnable {

	final int MAXN = 100000;
	final int MAXK = 1000000000;
	final int MAXA = 1000000000;
	
	private void solve() throws IOException {
		int n = in.nextInt();
		int k = in.nextInt();
		assert 1 <= n && n <= MAXN;
		assert 1 <= k && k <= MAXK;
		
		HashMap<Long, Integer> hm = new HashMap<Long, Integer>();
		long sum = 0;
		hm.put(sum, -1);
		
		int ansl = 0;
		int ansi = -1;
		
		for (int i = 0; i < n; ++i) {
			int a = in.nextInt();
			assert 1 <= a && a <= MAXA;
			sum += a - k;
			Integer l = hm.get(sum);
			if (l != null) {
				if (ansl < i - l) {
					ansl = i - l;
					ansi = l + 1;
				}
			} else {
				hm.put(sum, i);
			}
		}
		
		if (ansl == 0) {
			out.println(0);
		} else {
			out.println(ansl + " " + (ansi + 1));
		}		
	}

	final String FILE_NAME = "cubics";

	SimpleScanner in;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new SimpleScanner(new FileReader(FILE_NAME + ".in"));
			out = new PrintWriter(FILE_NAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Thread(new cubics_ab()).start();
	}

	class SimpleScanner extends BufferedReader {

		private StringTokenizer st;
		private boolean eof;

		public SimpleScanner(Reader a) {
			super(a);
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(readLine());
				} catch (Exception e) {
					eof = true;
					return "";
				}
			}
			return st.nextToken();
		}

		boolean seekEof() {
			String s = next();
			if ("".equals(s) && eof)
				return true;
			st = new StringTokenizer(s + " " + st.toString());
			return false;
		}

		private String cnv(String s) {
			if (s.length() == 0)
				return "0";
			return s;
		}

		int nextInt() {
			return Integer.parseInt(cnv(next()));
		}

		double nextDouble() {
			return Double.parseDouble(cnv(next()));
		}

		long nextLong() {
			return Long.parseLong(cnv(next()));
		}
	}
}