n = int(input()) print(*([10, n - 10] if n > 10 else [1, n - 1]))