x = int(input()) ans = 1 n = 31 if x > n: print(0, 0) exit() elif x == 0: print(1, 0) exit() for i in range(n, n - x, -1): ans *= i for i in range(1, x + 1): ans //= i ans2 = (1 << n) - 1 for i in range(n - 1, n - x, -1): ans2 *= i for i in range(1, x): ans2 //= i print(ans, ans2)