Give a pair of integers (A, B) such that A^5-B^5 = X. It is guaranteed that there exists such a pair for the given integer X.
x =int(input())
a =[i**5 for i in range(120)]
for i in range(120):
    for j in range(120):
        if a[i] -a[j] ==x:
            print(j,i)
            break
        elif a[j] -a[i] ==x:
            print(i,j)
            break
    else:
        continue
    break
x =int(input())
a =[i**5 for i in range(120)]
for i in range(120):
    for j in range(i+1,120):
        if a[j] -a[i] ==x:
            print(j,i)
            break
        if a[j] +a[i] ==x:
            print(j,-i)
            break
