from math import comb x = int(input()) print(comb(31, x), (pow(2, 31) - 1) * comb(30, x - 1))