""" https://yukicoder.me/problems/no/420 xbit立っている数の集合 """ # normal nCr def nCr_Plane(n,r): if n < r or n < 0: return 0 import math return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) x = int(input()) if x == 0: print (0,0) elif x > 31: print (0,0) else: cnt = nCr_Plane(31,x) s = nCr_Plane(30,x-1) * (2**31-1) print (cnt,s)