from math import factorial x = int(input()) if x == 0: print(1, 0) exit() elif x >= 32: print(0, 0) exit() n = factorial(30) // factorial(x-1) // factorial(30-x+1) total = 0 for i in range(31): total += 2**i * n print(factorial(31) // factorial(x) // factorial(31-x), total)