from scipy.misc import comb;n=input();print int(comb(31,n)),int(comb(30,n-1))*(2**31-1)