import sys input=lambda: sys.stdin.readline().rstrip() import math x=int(input()) def f(n): return math.factorial(n) def c(n,k): return f(n)//(f(n-k)*f(k)) if x>31: print(0,0) elif x==0: print(1,0) else: ans1=c(31,x) ans2=0 com=c(30,x-1) for i in range(31): ans2+=pow(2,i)*com print(ans1,ans2)