def fact(x): if x == 1: return 1 else: return fact(x-1) * x def combination(n, k): return fact(n) // (fact(n-k) * fact(k)) def main(): x = int(input()) # f(n) = x となるnの個数は31Ck count = combination(31, x) cumsum = (2**31 - 1) * combination(30, x-1) print(count, cumsum); main()