def main(): N = int(input()) if N < 7: print(-1) return div_, mod_ = divmod(N, 7) a = N - div_ b = N - a print(a, b) main()