x = int(eval(input()))



root = int(x**(0.2))



flag = 0

for i in range(root - 400, root + 400):

    for j in range(-100, root + 400):

        if i!=j:

            if x%(i-j) == 0:

                if i**5-j**5 == x:

                    print((i, j))

                    flag = 1

                    break

    if flag:

        break
x = int(eval(input()))



for a in range(-120, 120):

  for b in range(-120, 120):

    if a**5-b**5 == x:

      print((a, b))

      exit()
x = int(eval(input()))
root = int(x ** (0.2))
flag = 0
for i in range(root - 400, root + 400):
    for j in range(-100, root + 400):
        if i != j:
            if x % (i - j) == 0:
                if i**5 - j**5 == x:
                    print((i, j))
                    flag = 1
                    break
    if flag:
        break

x = int(eval(input()))
for a in range(-120, 120):
    for b in range(-120, 120):
        if a**5 - b**5 == x:
            print((a, b))
            exit()

-root = int(x ** (0.2)) -flag = 0 -for i in range(root - 400, root + 400): -    for j in range(-100, root + 400): -        if i != j: -            if x % (i - j) == 0: -                if i**5 - j**5 == x: -                    print((i, j)) -                    flag = 1 -                    break -    if flag: -        break +for a in range(-120, 120): +    for b in range(-120, 120): +        if a**5 - b**5 == x: +            print((a, b)) +            exit()