n = int(input()) from random import randrange INF = 10**9 while True: a = randrange(-INF,INF) b = n-a if -INF < b < INF: if "7" not in str(a) and "7" not in str(b): print(a,b) exit()