from math import lcm, ceil, log
from random import choice, randint
from os import system
import io
if __name__ == '__main__':
n = 5000
m = 10000
t = 200000
print(n, m)
for _ in range(m):