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 
#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   sz(s)         s.size()
#define   ll            long long int
#define   ull           unsigned ll
#define   ld            long double
#define   print(v)      for(ll i=0;i<v.size();i++)cout<<v[i]<<" "
#define   printpair(v)  for(ll i=0;i<v.size();i++)cout<<v[i].first<<" "<<v[i].second<<"\n"
#define   bmd           1000000007
#define   bmd1          998244353
#define   umll          unordered_map<ll,ll>
#define   mll           map<ll,ll>
#define   mcl           map<char,ll>
#define   pll           pair<ll,ll>
#define   F             first
#define   S             second
#define   setp(x)       setprecision(x)
#define   pb            push_back
#define   all(v)        v.begin(),v.end()
#define   tr(a)         for(auto it=a.begin();it!=a.end();it++)
#define   trr(a)        for(auto it1=a.begin();it1!=a.end();it1++)
#define   vll           vector<long long int>
#define   sorty(v)      sort(v.begin(),v.end())
#define   rsort(v)      sort(v.rbegin(),v.rend())
#define   PI            3.1415926535897932384626
#define   db()          cout<<"\n"<<"here"<<"\n"
template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;


//---------------------------------------------------------------------------
ll inf = 1e18;
const int MOD = bmd;
const int N=2e5+100;

//---------------------------------------------------------------------------
ll n, k;
map<ll,ll> bad;
bool comp(pll a, pll b) {
    ll cnt1 = 0,cnt2 = 0;
    for(ll i=a.F;i<=a.S;i++){
        if(bad[i] > k)
            cnt1++;
    }
    for(ll i=b.F;i<=b.S;i++){
        if(bad[i] > k)
            cnt2++;
    }
    return (cnt1<cnt2);
}
bool chk(mll bad) {
    tr(bad) {
        if(it->second > k)
            return false;
    }
    return true;
}
void solve()
{
    map<pll,vll> ind;
    cin >> n >> k;
    vector<pll> vp;
    for(ll i=1;i<=n;i++) {
        ll l , r;
        cin >> l >> r;
        ind[{l,r}].pb(i);
        vp.pb({l,r});
    }
    for(ll i=1;i<=200;i++) {
        ll cnt = 0;
        for(auto x: vp) {
            if(i >= x.F && i<= x.S)
                cnt++;
        }
        bad[i] = cnt;
    }
    vector<pll > v;
    for(auto x : vp) {
        v.pb(x);
    }
    sort(all(v),comp);
    
    map<pll,ll> mm;
    vll ans;
    while(!v.empty()){
        if(chk(bad))
            break;
        pll pi = v.back();
        for(ll j=pi.F;j<=pi.S;j++) {
            if(bad.find(j) != bad.end()) {
                bad[j]--;
                if(bad[j] == 0)
                    bad.erase(j);
            }
        }
        ans.pb(ind[pi].back());
        ind[pi].pop_back();
        v.pop_back();
        sort(v.begin(),v.end(),comp);
    }
    cout << ans.size() <<"\n";
    print(ans);
}
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r" , stdin);
    freopen("output.txt", "w" , stdout);
    #endif
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    ll t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
    return 0;
}
