x = int(input()) if x > 31: print(0, 0) exit() if x == 0: print(1, 0) exit() N = 10**3 C = [[0]*(N+1) for i in range(N+1)] #C[n][k] > nCk for i in range(N+1): for j in range(i+1): if j == 0 or j == i: C[i][j] = 1 else: C[i][j] = C[i-1][j-1]+C[i-1][j] def cmb(n, k): return C[n][k] table = [0]*33 table[0] = 1 for i in range(1, 33): table[i] = table[i-1]*2 c = cmb(31, x) s = 0 for i in range(31): s += table[i]*cmb(30, x-1) print(c, s)