The only difference between easy and hard versions is constraints.

You are given n segments on the coordinate axis OX. Segments can intersect, lie inside each other and even coincide. The i-th segment is [l_i; r_i] (l_i ≤ r_i) and it covers all integer points j such that l_i ≤ j ≤ r_i.

The integer point is called bad if it is covered by strictly more than k segments.

Your task is to remove the minimum number of segments so that there are no bad points at all.

Input

The first line of the input contains two integers n and k (1 ≤ k ≤ n ≤ 200) — the number of segments and the maximum number of segments by which each integer point can be covered.

The next n lines contain segments. The i-th line contains two integers l_i and r_i (1 ≤ l_i ≤ r_i ≤ 200) — the endpoints of the i-th segment.

Output

In the first line print one integer m (0 ≤ m ≤ n) — the minimum number of segments you need to remove so that there are no bad points.

In the second line print m distinct integers p_1, p_2, ..., p_m (1 ≤ p_i ≤ n) — indices of segments you remove in any order. If there are multiple answers, you can print any of them.

Examples

Input


7 2
11 11
9 11
7 8
8 9
7 8
9 11
7 9


Output


3
1 4 7 


Input


5 1
29 30
30 30
29 29
28 30
30 30


Output


3
1 2 4 


Input


6 1
2 3
3 3
2 3
2 2
2 3
2 3


Output


4
1 3 5 6 
import java.io.*; 
import java.math.*;
import java.util.*;
 
public class Main {
	//static final long MOD = 998244353;
	static final long MOD = 1000000007;
	static final int INF = 1000000007;
	static boolean[] visited;
    public static void main(String[] args) throws IOException {
    	FastScanner sc = new FastScanner();
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[][] segments = new int[N][3];
        int[][] events = new int[2*N+1][2];
        for (int i = 0; i < N; i++) {
        	segments[i] = new int[]{sc.nextInt(),sc.nextInt(),i+1};
        	events[2*i] = new int[]{segments[i][0],0}; //begin
        	events[2*i+1] = new int[]{segments[i][1]+1,1}; //end
        }
        events[2*N] = new int[]{Integer.MAX_VALUE,Integer.MAX_VALUE};
        events = sort(events);
        int X = 300;
        int[] strip = new int[X];
        int index = 0;
        for (int i = 1; i < X; i++) {
        	strip[i] = strip[i-1];
        	while (events[index][0] == i) {
        		if (events[index][1] == 0) {
        			strip[i] += 1;
        		} else {
        			strip[i] -= 1;
        		}
        		index++;
        	}
        }
        boolean[] vis = new boolean[N];
        ArrayList<Integer> removed = new ArrayList<Integer>();
        while (true) {
        	boolean end = true;
        	for (int i = 0; i < X; i++) {
        		if (strip[i] > K) {
        			end = false;
        			break;
        		}
        	}
        	if (end) break;
        	int remove = -1;
        	int max = 0;
        	for (int i = 0; i < N; i++) {
        		if (vis[i] == true) continue;
        		int curSize = 0;
        		for (int j = segments[i][0]; j <= segments[i][1]; j++) {
        			if (strip[j] > K)
        				curSize++;
        		}
        		
        		if (curSize > max) {
        			max = curSize;
        			remove = i;
        		}
        	}
        	
        	removed.add(remove);
        	vis[remove] = true;
        	for (int i = segments[remove][0]; i <= segments[remove][1]; i++) {
        		strip[i] -= 1;
        	}
        }
        System.out.println(removed.size());
        for (int num: removed)
        	System.out.print((num+1) + " ");
    }
    
    static class BinaryIndexedTree {
    	  private int[] arr;

    	  public BinaryIndexedTree (int N) {
    	    arr = new int[N+1];
    	    arr[0] = 0;
    	  }

    	  //add k to the i-th element.
    	  public void add(int k, int i) {
    	    int node = i+1;
    	    while (node < arr.length) {
    	      arr[node] += k;
    	      node += node & (-node);
    	    }
    	  }

    	  //sum up the elements from input[s_i] to input[e_i], from [s_i,e_i).
    	  public int sum(int s_i, int e_i) {
    	    return sum(e_i) - sum(s_i);
    	  }

    	  public int sum(int i) {
    	    int total = 0;
    	    int node = i;
    	    while (node > 0) {
    	      total += arr[node];
    	      node -= node & (-node);
    	    }
    	    return total;
    	  }

    	  public int[] getArr() {
    	    return arr;
    	  }
    }
    
    public static long power(long x, long y, long p) { 
        // Initialize result
        long res = 1;
         
        // Update x if it is more   
        // than or equal to p 
        x = x % p;  
      
        while (y > 0) 
        { 
            // If y is odd, multiply x 
            // with result 
            if((y & 1)==1) 
                res = (res * x) % p; 
      
            // y must be even now 
            // y = y / 2 
            y = y >> 1;  
            x = (x * x) % p;  
        } 
        return res; 
    }
    
    public static long dist(int[] point, int[] point2) {
    	return (long)(Math.pow((point2[1]-point[1]),2)+Math.pow((point2[0]-point[0]),2));
    }
    
    public static long gcd(long a, long b) {
    	if (b == 0)
    		return a;
    	else
    		return gcd(b,a%b);
    }
    
    public static int[][] sort(int[][] array) {
    	//Sort an array (immune to quicksort TLE)
		Random rgen = new Random();
		for (int i = 0; i < array.length; i++) {
		    int randomPosition = rgen.nextInt(array.length);
		    int[] temp = array[i];
		    array[i] = array[randomPosition];
		    array[randomPosition] = temp;
		}
		Arrays.sort(array, new Comparator<int[]>() {
			  @Override
        	  public int compare(int[] arr1, int[] arr2) {
				  if (arr1[0] != arr2[0])
					  return arr1[0]-arr2[0];
				  else
					  return arr2[1]-arr1[1];
	          }
		});
		return array;
	}
    
    static class FastScanner { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastScanner() { 
            br = new BufferedReader(new InputStreamReader(System.in)); 
        } 
  
        String next() { 
            while (st == null || !st.hasMoreElements()) { 
                try { 
                    st = new StringTokenizer(br.readLine());
                } catch (IOException  e) { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() { 
            String str = ""; 
            try { 
                str = br.readLine(); 
            } catch (IOException e) {
                e.printStackTrace(); 
            } 
            return str; 
        }
    }
}