def combi(n,r): if r == 0: return 1 return combi(n,r-1) * (n-r+1) / r x = int(raw_input()) a = combi(31,x) b = (2**31-1) * combi(30,x-1) print a,b