import random
import sys

sys.set_int_max_str_digits(1000000)

random.seed(str(sys.argv))

l1 = int(sys.argv[1])
l2 = int(sys.argv[2])

while True:
	b = random.randint(10 ** (l1 - 1), 10 ** l1 - 1)
	c = random.randint(10 ** (l2 - 1), 10 ** l2 - 1)
	a = b * c

	x = len(str(b)) + len(str(c)) - len(str(a))

	if len(sys.argv) == 3 or int(sys.argv[3]) == x:
		break

print(f"{a}{b} {c}")