#include using namespace std; using ll = long long; using ld = long double; using pll = pair; using pld = pair; using vll = vector; using vld = vector; using vpll = vector; using vpld = vector; using vvll = vector; using vvld = vector; template using min_queue = priority_queue, greater>; template using max_queue = priority_queue, less>; #define rep(i, a, b) for(ll i = (ll)a; i < (ll)b; i++) #define irep(i, v) for(auto i = (v).begin(); i != (v).end(); i++) #define SZ(v) (ll)(v).size() #define ALL(v) (v).begin(), (v).end() #define SHIFT(a) (1LL << (ll)a) #define endl '\n' const ll INF = 1e18; const ll MOD = 1e9 + 7; const ld EPS = 1e-10; const ld PI = M_PI; ll power(ll x, ll y){ ll res = 1; while(y > 0){ if(y & 1){ res *= x; } x *= x; y >>= 1; } return res; } bool in_grid(ll x, ll y, ll h, ll w){ return (0 <= x && x < h && 0 <= y && y < w); } template void pvec(vector &vec){ for(ll i = 0; i < (ll)vec.size(); i++){ if(i){ cout << " "; } cout << vec[i]; } cout << endl; } template void pvvec(vector> &vec){ for(ll i = 0; i < (ll)vec.size(); i++){ for(ll j = 0; j < (ll)vec[i].size(); j++){ if(j){ cout << " "; } cout << vec[i][j]; } cout << endl; } } template void asort(vector &vec){ sort(ALL(vec)); } template void rsort(vector &vec){ sort(ALL(vec)); reverse(ALL(vec)); } void pr(pll p){ cout << p.first << " " << p.second << endl; } using ppll = pair; bool comp1(ppll &p1, ppll &p2){ return (p1.first.first < p2.first.first); } bool comp2(ppll &p1, ppll &p2){ return (p1.first.first > p2.first.first); } //using mint = modint; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); srand((unsigned)time(NULL)); cout << fixed << setprecision(20); ll n, m; cin >> n >> m; vpll vec(n); rep(i, 0, n) cin >> vec[i].first >> vec[i].second; vector vec1, vec2, vec3, vec4; ll x = vec[0].first, y = vec[0].second; rep(i, 1, n){ ll xp = vec[i].first, yp = vec[i].second; if(xp >= x && yp < y) vec1.push_back({vec[i], i + 1}); if(xp > x && yp >= y) vec2.push_back({vec[i], i + 1}); if(xp <= x && yp > y) vec3.push_back({vec[i], i + 1}); if(xp < x && yp <= y) vec4.push_back({vec[i], i + 1}); } sort(ALL(vec1), comp1); sort(ALL(vec2), comp2); sort(ALL(vec3), comp2); sort(ALL(vec4), comp1); rep(i, 0, m){ pll t = {0, 0}; pr(t); } ll v = n + 1; cout << v << endl; pr({1, 1}); rep(i, 0, SZ(vec1)) cout << 1 << " " << vec1[i].second << endl; rep(i, 0, SZ(vec2)) cout << 1 << " " << vec2[i].second << endl; rep(i, 0, SZ(vec3)) cout << 1 << " " << vec3[i].second << endl; rep(i, 0, SZ(vec4)) cout << 1 << " " << vec4[i].second << endl; pr({1, 1}); return 0; }