#!/usr/bin/env python3
import random
import sys

random.seed(int(sys.argv[1]))
a = random.randint(1,20)
b = random.randint(1,20)
w = random.randint(900000000, 1000000000)

print(a+b, w)
ms = [(w,1)] * a + [(1,w)] * b
random.shuffle(ms)

for (x,y) in ms:
    print(x, y)
