import sys import math def number(x): return a * (x ** 5) + b * (x ** 4) + c * (x ** 3) + d * (x ** 2) + e * x + f def result(x): global ans if number(x) == 0: print(f"{x} {x}") ans = True if x >= 35: return if number(x) * number(x + 1) < 0: print(f"{x} {x+1}") result(x+1) ans = True else: result(x+1) for line in sys.stdin: a, b, c, d, e, f = map(int, line.split()) ans = False if number(-35) * number(35) == 0: print("Too many... = =\"") break result(-35) if not ans: print("N0THING! >\\\\\\<")