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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

/**
 * D1_Too_Many_Segments_easy_version_
 */
public class D1_Too_Many_Segments_easy_version_ {

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            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;
        }

        int[] intArr(int n) {
            int res[] = new int[n];
            for (int i = 0; i < n; i++)
                res[i] = nextInt();
            return res;
        }

        long[] longArr(int n) {
            long res[] = new long[n];
            for (int i = 0; i < n; i++)
                res[i] = nextLong();
            return res;
        }
    }

    static FastReader f = new FastReader();
    static BufferedWriter w = new BufferedWriter(new OutputStreamWriter(System.out));
    static int mod = (int) (1e9) + 7;
    static class Pair<X extends Number, Y extends Number, Z extends Number> implements Comparator<Pair> {
            X x;
            Y y;
            Z id;
            // Constructor
            public Pair(X x, Y y,Z id) {
                this.x = x;
                this.y = y;
                this.id=id;
            }
    
            public Pair() {
    
            }
            @Override
            public int compare(D1_Too_Many_Segments_easy_version_.Pair o1, D1_Too_Many_Segments_easy_version_.Pair o2) {
                return ((int) (o1.y.intValue() - o2.y.intValue()));// Ascending Order based on 'y'
            }
        }
    public static void main(String args[]) throws Exception {
        int t = 1;
        // t = f.nextInt();
        int tc = 1;
        while (t-- != 0) {
            int n=f.nextInt();
            int k=f.nextInt();
            @SuppressWarnings("unchecked")
            ArrayList<Integer> hash[]=new ArrayList[200+5];
            int cnt[]=new int[200+5];
            @SuppressWarnings("unchecked")
            PriorityQueue<Pair<Integer,Integer,Integer>> pq[]=new PriorityQueue[200+5];
            for(int i=0;i<=200;i++){
                pq[i]=new PriorityQueue<>((p,b)->(b.y-b.x)-(p.y-p.x));
            }
            ArrayList<Pair<Integer,Integer,Integer>> a=new ArrayList<>();
            for(int i=0;i<n;i++){
                int l=f.nextInt();
                int r=f.nextInt();
                a.add(new Pair<>(l,r,i));
                hash[i]=new ArrayList<>();
                for(int j=l;j<=r;j++){
                    hash[i].add(j);
                    cnt[j]++;
                    
                    pq[j].add(new Pair<>(j,r,i));
                }
            }
            // for(int i=7;i<=11;i++){
            //     w.write("cnt= "+cnt[i]+"\n");
            //     while(!pq[i].isEmpty()){
            //         Pair<Integer,Integer,Integer> head=pq[i].poll();
            //         w.write(head.x+" "+head.y+" "+head.id+"\n");
            //     }
            // }
            // ArrayList<Integer> ans=new ArrayList<>();
            HashSet<Integer> ans=new HashSet<>();
            for(int i=0;i<203;i++){
                while(cnt[i]>k){
                    Pair<Integer,Integer,Integer> head=pq[i].poll();
                    int id=head.id;
                    while(!pq[i].isEmpty()&&ans.contains(head.id)){
                        head=pq[i].poll();
                        id=head.id;
                        System.out.println(head.x+" "+head.y+" "+head.id);
                    }
                    if(ans.contains(id))continue;
                    ans.add(id);
                    for(int j:hash[id]){
                        cnt[j]--;
                    }
                    hash[id].clear();
                }
            }
            w.write(ans.size()+"\n");
            for(int i:ans){
                w.write((i+1)+" ");
            }
            w.write("\n");
            // System.out.println(ans);
        }
        w.flush();
    }
}