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

public class cubics_sp_30_as implements Runnable {

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

	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new FileReader(FILENAME + ".in"));
			out = new PrintWriter(FILENAME + ".out");
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	BufferedReader br;

	PrintWriter out;

	StringTokenizer st;

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(br.readLine());
		}
		return st.nextToken();
	}

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

	void myAssert(boolean e, String s) {
		if (!e) {
			throw new Error("Assertion failure " + s);
		}
	}

	private static final String FILENAME = "cubics";
	
	int MAXN = 100;
	int MAX = 1000000000;

	public void solve() throws IOException {
		int n = nextInt();
		myAssert(1 <= n && n <= MAXN, "Wrong n");
		int k = nextInt();
		myAssert(1 <= k && k <= MAX, "Wrong k");
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int t = nextInt();
			myAssert(1 <= t && t <= MAX, "Wrong a[" + (i + 1) + "]");
			a[i] = t - k;
		}
		long s = 0;
		int ansl = 0;
		int ansm = -1;
		HashMap<Long, Integer> hm = new HashMap<Long, Integer>();
		int cnt = 0;
		for (int i = 0; i < n; i++) {
			if (!hm.containsKey(s)) {
				hm.put(s, i);
			}
			s += a[i];
			if (hm.containsKey(s)) {
				cnt++;
				int l = i - hm.get(s) + 1;
				if (l > ansl) {
					ansl = l;
					ansm = hm.get(s) + 1;
				}
			}
		}
//		System.out.println(cnt);
		if (ansm == -1) {
			out.println(0);
		} else {
			out.println(ansl + " " + ansm);
		}
	}
}
