import sys from math import factorial def debug(x, table): for name, val in table.items(): if x is val: print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr) return None def binom(n, r): return factorial(n) // (factorial(n - r) * factorial(r)) def solve(): x = int(input()) if x >= 32: print(0,0) return elif x == 0: print(1,0) return sum2 = 2**31 - 1 comb = binom(31, x) tot = sum2 * binom(30, x-1) print(comb, tot) if __name__ == '__main__': solve()