Problem: 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 

Solution (in PYTHON3):

Solution:
import sys
input = sys.stdin.readline

"""

"""

class LLNode:
    def __init__(self, l, r, i):
        self.l = l
        self.r = r
        self.i = i
        self.next = None

    def __str__(self):
        return f"{self.l, self.r}, i={self.i}, next={'Node' if self.next else None}"

class LL:
    def __init__(self):
        self.head = None
    
    def append(self, l, r, i):
        new_node = LLNode(l, r, i)

        if not self.head:
            self.head = new_node
            return

        cur_node = self.head
        while cur_node.next:
            cur_node = cur_node.next
        
        cur_node.next = new_node
    
    def get_delete_best(self, point):
        best_node = None
        best_r = -1

        best_prev = None
        prev = None
        node = self.head
        
        while node:
            #print(node.l+1, node.r+1)
            if node.l <= point <= node.r and node.r > best_r:
                best_r = node.r
                best_prev = prev
                best_node = node
            
            #print("node", node)
            #print("best", best_node)
            prev = node
            node = node.next

        if best_node == self.head:
            self.head = best_node.next
            return best_node
        else:
            #print(prev, best_node)
            best_prev.next = best_node.next
            return best_node
    
    def __iter__(self):
        node = self.head
        while node:
            yield node
            node = node.next
    
    def __str__(self):
        return " ".join(str((s.l, s.r)) for s in self.__iter__())

    def __eq__(self, other):
        return self.i == other.i

def pop_best(segments, point):
    best_idx = None
    best_r = -1
    for idx, seg in enumerate(segments):
        if seg.l <= point <= seg.r and seg.r > best_r:
            best_r = seg.r
            best_idx = idx
    
    return segments.pop(best_idx)

def solve(n, k, segments, MIN_L,  MAX_R):
    k_vals = [0] * (MAX_R + 1)
    del_segments = []

    for seg in segments:
        l, r = seg.l, seg.r
        for i in range(l, r+1):
            k_vals[i] += 1

    #print(k_vals)
    for point in range(MIN_L, MAX_R+1):
        while k_vals[point] > k:
            
            seg = pop_best(segments, point)
            del_segments.append(seg.i)
            for j in range(seg.l, seg.r+1):
                k_vals[j] -= 1

            #print(k_vals)

    #print(segments)

    print(len(del_segments))
    print(*del_segments)

from collections import namedtuple

seg = namedtuple("seg", "l, r, i")

n, k = map(int, input().split())
segments = []
MIN_L = 201
MAX_R = 0
for i in range(1, n + 1):
    l, r = map(lambda x: int(x)-1, input().split())
    MAX_R = max(r, MAX_R)
    MIN_L = min(MIN_L, l)
    segments.append(seg(l, r, i))
    
solve(n, k, segments, MIN_L, MAX_R)


"""
segments = LL()
segments.append(0, 10, 1)
segments.append(1, 11, 2)
segments.append(3, 7, 3)
segments.append(8, 20, 4)


print(segments)

segments.get_delete_best(12)

print(segments)
"""