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

public class cubics_aa {
	public static void main(String[] args) {
		new cubics_aa().run();
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	boolean eof = false;
	Random rand = new Random(125475452);

	private void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

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

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	void check(boolean u) {
		if (!u) {
			throw new Error("Assertion failed!!!");
		}
	}

	String FNAME = "cubics";

	int MAX = 100000;
	int BOUND = (int) 1e9;

	private void solve() throws IOException {
		int n = nextInt();
		check(1 <= n && n <= MAX);
		long k = nextInt();
		check(1 <= k && k <= BOUND);
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = nextInt();
			check(1 <= a[i] && a[i] <= BOUND);
		}
		for (int i = 0; i < a.length; i++) {
			a[i] -= k;
		}
		long s = 0;
		int len = 0;
		int beg = -1;
		HashMap<Long, Integer> hm = new HashMap<Long, Integer>();
		hm.put((long) 0, -1);
		for (int i = 0; i < a.length; i++) {
			s += a[i];
			if (hm.containsKey(s)) {
				int l = i - hm.get(s);
				if (len < l) {
					len = l;
					beg = i - l + 2;
				}
			} else {
				hm.put(s, i);
			}
		}
		out.print(len);
		if (len > 0) {
			out.println(" " + beg);
		}
	}

}