public static void main(String[] args) throws Throwable{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		StringTokenizer st = new StringTokenizer(in.readLine());
		int n = Integer.parseInt(st.nextToken());
		k = Integer.parseInt(st.nextToken());
		num = new int[n];
		sum = new int[n];
		mem = new int[n][n];
		for (int i = 0; i < mem.length; i++) {
			Arrays.fill(mem[i], -1);
		}
		st = new StringTokenizer(in.readLine());
		for (int i = 0; i < n; i++) {
			num[i] = Integer.parseInt(st.nextToken());
			if(i-1 >= 0)
				sum[i] = num[i]+sum[i-1];
			else sum[i]=num[i];
		}
		int max = f( 0,k );
		boolean chimbito = false;
		for (int i = 0; i < mem.length && !chimbito; i++) {
			System.out.println(Arrays.toString(mem[i]));
			for (int j = 0; j < mem[i].length && !chimbito; j++) {
				if( mem[i][j]==max){
					sb.append((i+1)+" "+(j+1)+"\n");
					chimbito = true;
				}
			}
		}
		
		System.out.print(new String(sb));
	}