N = 1000 W = 1000 ans = [] ans.append((10**6, 1)) for i in reversed(range(2, W+1)): if i == W: ans.append((10**6*i-1, i)) else: right = (10**6-ans[-1][0]/ans[-1][1])/(i-1) x = ans[-1][0]/ans[-1][1]-right x = int(x) ans.append(((x*i, i))) print(N, W) for a in ans: print(*a)