import sys, re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd x=int(input()) if x == 0: print(1, 0) exit() if x > 31: print(0, 0) exit() cnt = factorial(31)//factorial(x)//factorial(31-x) su = 0 conv = factorial(30)//factorial(x-1)//factorial(31-x) for i in range(31): su += (1 << i) * conv print(cnt, su)