def combination(n, r): if n < r or r < 0: return 0 s = 1.0 for i in range(1, r+1): s *= (n-i+1) / i return int(s) x = int(input()) a = combination(31, x) b = combination(30, x-1)*(2**31-1) print(a, b)