import math x=int(input()) if x==0: print(' '.join(['1','0'])) elif x>31: print(' '.join(['0','0'])) else: cnt=math.factorial(31)//math.factorial(x)//math.factorial(31-x) tot=(2**31-1)*math.factorial(30)//math.factorial(x-1)//math.factorial(31-x) print(' '.join([str(cnt),str(tot)]))