i = int(input())
a = i%2
b=i//2
if a==0:
    print(b,b)
else:
    print(b+1,b)