from math import sin
from functools import reduce
print(reduce(lambda x, y: x * y, [sin(sum([z for z in range(i + 1)])) for i in range(1, int(input()) + 1)]))
from math import sin
from functools import reduce
print(reduce(lambda x, y: x * y, [sin(sum([z for z in range(i + 1)])) for i in range(1, int(input()) + 1)]))