x = int(input()) if x <= 31: prod = 1 for i in range(x): prod *= (31 - i) prod //= i + 1 print(prod, 2147483647 * x * prod // 31) else: print(0, 0)