from math import gcd import sys mx = 1000 v = [] for x in range(1, mx): for y in range(1, mx - x + 1): if gcd(x, y) == 0: v.append((x, y)) v.sort(key=lambda a: a[1] / a[0]) v = v[:250000] print(1000000) X, Y = 0, 0 for x, y in v: print(X, Y) X += x Y += y for x, y in v: print(X, Y) X += -y Y += x for x, y in v: print(X, Y) X += -x Y += -y for x, y in v: print(X, Y) X += y Y += -x sys.stdout.flush()