import math N = int(input()) if N == 0: print("9 1") elif N == 1: print("26 1") else: pi = math.pi B_max = int(pi * (10 ** N)) - 1 product = B_max * B_max s = sum(int(d) for d in str(product)) print(f"{s} 1")