from math import comb x = int(input()) a = comb(31,x) b = (2**31-1) * a * x // 31 print(a,b)