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