#!/usr/bin/env pypy3 import random ITER_LIMIT = 10 ** 6 MAX_ANS = 10 ** 9 MIN_ANS = -MAX_ANS def maybe_ans(n): a = random.randint(0, MAX_ANS) b = n - a if "7" not in str(a) and "7" not in str(b): return (a, b) def solve(n): for _ in range(ITER_LIMIT): res = maybe_ans(n) if res is not None: return res else: raise Exception("Oops!") def main(): a, b = solve(int(input())) print(a, b) if __name__ == '__main__': main()