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