x = int(input()) if x >= 32: print(0, 0) exit() n = 1 for i in range(x): n *= (31 - i) n //= i + 1 m = n * x * (2**31 - 1) // 31 print(n, m)