from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline x = int(input()) if x>31: print(0,0) exit() if x==0: print(1,0) exit() s = math.comb(31,x) t = math.comb(30,x-1)*((1<<31)-1) print(s,t)