M = 10 ** 5 W = 1000 N = 1001 a = [(M, 1), (1, 1)] for i in range(1, 1000): a.append((i * M + i + 1, i + 1)) print(N, W) for i, j in a: print(i, j)