N = 2 W = 1000 pairs = [(1000, 500), (1001, 501)] print(N, W) for pair in pairs: print(*pair)