x = int(eval(input()))

sign = ((1,1),(1,-1),(-1,1),(-1,-1))

isloop=True

for a in range(10**3):

    if(isloop==False):

        break

    for b in range(10**3):

        if(isloop==False):

            break

        for s1,s2 in sign:

            if(isloop==False):

                break

            a1 = s1*a

            b1 = s2*b

            if((a1**5)==(x+b1**5)):

                print((a1,b1))

                isloop=False

                break

            

        
n = int(eval(input()))

tp = ((1,1),(1,-1))

for i in range(200):

    for j in range(200):

        for k in tp:

            a,b = i*k[0],j*k[1]

            if((a**5 - b**5)==n):

                print((a,b))

                exit()
x = int(eval(input()))
sign = ((1, 1), (1, -1), (-1, 1), (-1, -1))
isloop = True
for a in range(10**3):
    if isloop == False:
        break
    for b in range(10**3):
        if isloop == False:
            break
        for s1, s2 in sign:
            if isloop == False:
                break
            a1 = s1 * a
            b1 = s2 * b
            if (a1**5) == (x + b1**5):
                print((a1, b1))
                isloop = False
                break

n = int(eval(input()))
tp = ((1, 1), (1, -1))
for i in range(200):
    for j in range(200):
        for k in tp:
            a, b = i * k[0], j * k[1]
            if (a**5 - b**5) == n:
                print((a, b))
                exit()

-x = int(eval(input())) -sign = ((1, 1), (1, -1), (-1, 1), (-1, -1)) -isloop = True -for a in range(10**3): -    if isloop == False: -        break -    for b in range(10**3): -        if isloop == False: -            break -        for s1, s2 in sign: -            if isloop == False: -                break -            a1 = s1 * a -            b1 = s2 * b -            if (a1**5) == (x + b1**5): -                print((a1, b1)) -                isloop = False -                break +n = int(eval(input())) +tp = ((1, 1), (1, -1)) +for i in range(200): +    for j in range(200): +        for k in tp: +            a, b = i * k[0], j * k[1] +            if (a**5 - b**5) == n: +                print((a, b)) +                exit()