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

public class cubics_sp_sort implements Runnable {

	public static void main(String[] args) {
		new Thread(new cubics_sp_sort()).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 = 100000;
	int MAX = 1000000000;
	
	class Pair implements Comparable<Pair> {
		long sum;
		int pos;
		
		public Pair(long s, int i) {
			sum = s;
			pos = i;
		}

		@Override
		public int compareTo(Pair o) {
			if (sum < o.sum) return -1;
			if (sum > o.sum) return 1;
			return pos - o.pos;
		}
	}

	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;
		Pair[] p = new Pair[n + 1];
		p[0] = new Pair(s, 0);
		for (int i = 0; i < n; i++) {
			s += a[i];
			p[i + 1] = new Pair(s, i + 1);
		}
		Arrays.sort(p);
		int i = 0;
		while (i < p.length) {
			int j = i + 1;
			while (j < p.length && p[j].sum == p[i].sum) {
				j++;
			}
			if (j > i + 1 && p[j - 1].pos - p[i].pos > ansl) {
				ansl = p[j - 1].pos - p[i].pos;
				ansm = p[i].pos + 1;
			}
			i = j;
		}
		if (ansm == -1) {
			out.println(0);
		} else {
			out.println(ansl + " " + ansm);
		}
	}
}
