x = int(eval(input()))



for i in range(-1000, 1000):

    for j in range(-1000, 1000):

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

            print((i, j))

            exit()

def f(x):

    return pow(x, 5) - pow(x - 1, 5)





x = int(eval(input()))



a_mx = 1

while f(a_mx) < x:

    a_mx += 1



a_mn = 0

while f(a_mn) < x:

    a_mn -= 1



b_mx = a_mx - 1

b_mn = a_mn - 1



for a in range(a_mn, a_mx + 1):

    for b in range(b_mn, b_mx + 1):

        if pow(a, 5) - pow(b, 5) == x:

            print((a, b))

            exit()

x = int(eval(input()))
for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

def f(x):
    return pow(x, 5) - pow(x - 1, 5)


x = int(eval(input()))
a_mx = 1
while f(a_mx) < x:
    a_mx += 1
a_mn = 0
while f(a_mn) < x:
    a_mn -= 1
b_mx = a_mx - 1
b_mn = a_mn - 1
for a in range(a_mn, a_mx + 1):
    for b in range(b_mn, b_mx + 1):
        if pow(a, 5) - pow(b, 5) == x:
            print((a, b))
            exit()

+def f(x): +    return pow(x, 5) - pow(x - 1, 5) + + -for i in range(-1000, 1000): -    for j in range(-1000, 1000): -        if i**5 - j**5 == x: -            print((i, j)) +a_mx = 1 +while f(a_mx) < x: +    a_mx += 1 +a_mn = 0 +while f(a_mn) < x: +    a_mn -= 1 +b_mx = a_mx - 1 +b_mn = a_mn - 1 +for a in range(a_mn, a_mx + 1): +    for b in range(b_mn, b_mx + 1): +        if pow(a, 5) - pow(b, 5) == x: +            print((a, b))