def solve(): x = int(input()) if x == 0: print('1 0') elif x > 32: print('0 0') else : import math ans_pat = math.factorial(31)//math.factorial(31-x)//math.factorial(x) ans_sum = math.factorial(30)//math.factorial(30-(x-1))//math.factorial(x-1) x_32 = 2147483647 print('{0} {1}'.format(ans_pat, x_32*ans_sum)) solve()