while True: try: n = int(input()) sum = 0 i, j = 0, 0 min, max = 0, 0 while True: # 对鸡贪心 if sum == n: max = i break elif sum > n: max, min = 0, 0 break sum += 2 i += 1 sum = 0 while True: # 对兔贪心 if sum == n or sum - n == 2: min = j break elif sum > n and sum - n != 2: min, max = 0, 0 break sum += 4 j += 1 print(min, end=" ") print(max) except: break