n = int(input()) M = 9*(n+1) import math x = int(math.pi*pow(10, n)) cnt = x//3 print(M, cnt)