#include int main () { int n[2] = { 0, 1000001 }; int x = 1000000000; int y = 0; while (n[1] - n[0] > 1) { long long nxt = (long long) ((n[0]+n[1])/2); if ((nxt*(nxt+3LL))-2LL <= 1000000000LL) { n[0] = (int) nxt; } else { n[1] = (int) nxt; } } printf("%d\n", n[0]*8-8); for (int i = n[0]; i > 1; i--) { x -= 1; y += i; printf("%d %d\n", x, y); } for (int i = 2; i <= n[0]; i++) { x -= i; y += 1; printf("%d %d\n", x, y); } for (int i = n[0]; i > 1; i--) { x -= i; y -= 1; printf("%d %d\n", x, y); } for (int i = 2; i <= n[0]; i++) { x -= 1; y -= i; printf("%d %d\n", x, y); } for (int i = n[0]; i > 1; i--) { x += 1; y -= i; printf("%d %d\n", x, y); } for (int i = 2; i <= n[0]; i++) { x += i; y -= 1; printf("%d %d\n", x, y); } for (int i = n[0]; i > 1; i--) { x += i; y += 1; printf("%d %d\n", x, y); } for (int i = 2; i <= n[0]; i++) { x += 1; y += i; printf("%d %d\n", x, y); } return 0; }