def maxNum(n): if n%2==1:return 0 if n%2==0:return n//2 def minNum(n): if n%2==1:return 0 if n%4==0:return n//4 else:return n//4+1 while True: try: num=int(input()) max=maxNum(num) min=minNum(num) print(f'{min} {max}') except EOFError: break