x = int(eval(input()))



for i in range(1000):

    #for j in range(10)

    #print(i ** 5)

    for j in range(1000):

        #print(i ** 5 - j ** 5)

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

            print((i, j))

            quit()

        elif i ** 5 - (-j) ** 5 == x:

            print((i, -j))

            quit()

        elif (-i) ** 5 - j ** 5 == x:

            print((-i, j))

            quit()

        elif (-i) ** 5 - (-j) ** 5 == x:

            print((-i, -j))

            quit()

x = int(eval(input()))

for a in range(-118, 119 + 1):

    for b in range(-119, 118 + 1):

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

            print((a, b))

            break

    else:

        continue

    break
x = int(eval(input()))
for i in range(1000):
    # for j in range(10)
    # print(i ** 5)
    for j in range(1000):
        # print(i ** 5 - j ** 5)
        if i**5 - j**5 == x:
            print((i, j))
            quit()
        elif i**5 - (-j) ** 5 == x:
            print((i, -j))
            quit()
        elif (-i) ** 5 - j**5 == x:
            print((-i, j))
            quit()
        elif (-i) ** 5 - (-j) ** 5 == x:
            print((-i, -j))
            quit()

x = int(eval(input()))
for a in range(-118, 119 + 1):
    for b in range(-119, 118 + 1):
        if a**5 - b**5 == x:
            print((a, b))
            break
    else:
        continue
    break

-for i in range(1000): -    # for j in range(10) -    # print(i ** 5) -    for j in range(1000): -        # print(i ** 5 - j ** 5) -        if i**5 - j**5 == x: -            print((i, j)) -            quit() -        elif i**5 - (-j) ** 5 == x: -            print((i, -j)) -            quit() -        elif (-i) ** 5 - j**5 == x: -            print((-i, j)) -            quit() -        elif (-i) ** 5 - (-j) ** 5 == x: -            print((-i, -j)) -            quit() +for a in range(-118, 119 + 1): +    for b in range(-119, 118 + 1): +        if a**5 - b**5 == x: +            print((a, b)) +            break +    else: +        continue +    break