import math x = int(input()) def solve(x): if x > 31: return 0, 0 a = math.factorial(31)//math.factorial(x)//math.factorial(31 - x) b = a * x // 31 * (2**31 - 1) return a, b print(*solve(x))