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 
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author Rishabhdeep Singh
 */

// doot diddly donger cuckerino Hahahahahah
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define PB              push_back
#define EB              emplace_back
#define F               first
#define S               second
#define all(a)          (a).begin(),(a).end()
#define sz(x)           (int)(x).size()
#define REP(x, n)       for(ll x = 0; x < n; ++x)
#define Unique(x)       sort(all(x)); (x).erase(unique(all(x), (x).end()));
#define IOS             ios::sync_with_stdio(false);cin.tie(NULL); cout << fixed << setprecision(12)
#define IN_REP          int tt; cin >> tt; while(tt--)
#define FORE(x, a)      for_each(all(a), [](auto& x)
#define sim             template<class T
#define ris             return * this
#define dor             > debug & operator <<
#define eni(x)          sim > typename enable_if<sizeof dud<T>(0) x 1, debug&>::type operator<<(T i)
sim> struct rge { T b, e; };
sim> rge<T> range(T i, T j) { return rge<T>{i, j}; }
sim> auto dud(T *x) -> decltype(cout << *x, 0);
sim> char dud(...);
struct debug {
#ifdef LOCAL
  ~debug() { cout << endl; }
  eni(!=) {
      cout << boolalpha << i;
      ris;
  }
  eni(==) { ris << range(all(i)); }
  sim, class U dor(pair<U, T> d) { ris << "(" << d.first << ", " << d.second << ")"; }
  sim dor(rge<T> d) {
      *this << "[";
      for (auto it = d.b; it != d.e; ++it) *this << ", " + 2 * (it == d.b) << *it;
      ris << "]";
  }
#else
  sim dor(const T&) { ris; }
#endif
};
#define pr(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vb = vector<bool>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vpii = vector<pii>;
using vpll = vector<pll>;
using ordered_set = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;

const ld EPS = (ld) 1e-9;
const ll MOD = (ll) 998244353;
const ld PI = acos(-1);

sim> T gcd(T x, T y) { return (y == 0) ? x : gcd(y, x % y); }
sim> void mini(T& x, T y) { x = min(x, y); }
sim> void maxi(T& x, T y) { x = max(x, y); }
sim, class U> string to_string(pair<T, U> p) { return to_string(p.F) + " " + to_string(p.S); }
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());


class D1TooManySegmentsEasyVersion {
  public:
    void solve(std::istream& cin, std::ostream& cout) {
        int n, k;
        cin >> n >> k;
        vi cnt(205, 0);
        vi res;
        vector<pair<pair<int, pii>, int>> a;
        for(int i = 0; i < n; ++i){
            int l, r;
            cin >> l >> r;
//            l--, r--;
            a.PB({{r - l + 1, {l, r}}, i});
        }
        sort(all(a));
        debug() << pr(a);
        for(int i = 0; i < n; ++i){
            int l = a[i].F.S.F;
            int r = a[i].F.S.S;
            bool ok = 1;
            for(int j = l; j <= r; ++j){
                if(cnt[j] == k){
                    ok = false;
                    break;
                }
            }
            if(ok){
                for(int j = l; j <= r; ++j) cnt[j]++;
            }else{
                res.PB(a[i].S + 1);
            }
        }
        cout << sz(res) << endl;
        for(int i : res){
            cout << i << " ";
        }
        cout << endl;
    }
};

int main() {
    IOS;
	D1TooManySegmentsEasyVersion solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}
