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

# Usage: gen_sqrt.py <maxa> <seed>
if len(sys.argv) < 3:
    print("Usage: gen_sqrt.py <maxa> <seed>")
    sys.exit(1)

maxa = int(sys.argv[1])
seed = int(sys.argv[2])

random.seed(seed)


print(1, 1)
k = random.randint(1, int(maxa**0.5))
print(k*k)
print(k)