#include using namespace std; int main() { int n, m; cin >> n >> m; vector a(n), b(n); for (int i = 0; i < n; i++) { cin >> a[i] >> b[i]; } for (int i = 0; i < m; i++) { cout << "500 500" << endl; } vector t, r; for (int i = 0; i < n; i++) { t.push_back(1); r.push_back(i + 1); int a0 = a[i], a1 = a[(i + 1) % n]; int b0 = b[i], b1 = b[(i + 1) % n]; int dx = a1 - a0, dx0 = a0 - 500, dx1 = a1 - 500; int dy = b1 - b0, dy0 = b0 - 500, dy1 = b1 - 500; if (5 * (dx * dx + dy * dy) > dx0 * dx0 + dy0 * dy0 + dx1 * dx1 + dy1 * dy1) { t.push_back(2); r.push_back(1); } } t.push_back(1); r.push_back(1); int v = t.size(); cout << v << endl; for (int i = 0; i < v; i++) { cout << t[i] << ' ' << r[i] << endl; } return 0; }