import random N = int(input()) while True: A = random.randint(-N,N) if "7" in str(A): continue B = N - A if "7" in str(B): continue break print(A,B)