N = 10**6 L = [] for i in range(1, 1300): for j in range(1, 1300): L.append((j/i, i, j)) L.sort() ans = [] nowx = -10**9 + 1 nowy = -10**9 + 1 nowslope = -1 for i in range(1, N): slope = L[i][0] x, y = L[i][1], L[i][2] if slope <= nowslope: continue nowx += x nowy += y nowslope = slope ans.append(str(nowx) + ' ' + str(nowy)) print(N) print('\n'.join(ans)) # for i in range(N): # print(ans[i][0], ans[i][1])