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.
from collections import Counter

X = int(input())

l = [0]
i = 0
while i**5 - (i-1)**5 <= X:
    i+=1
    l.append(i**5)

print(l)

for i in l:
    if Counter(l)[X - i]==1:
        print(l.index((X-i)), -l.index(i))
        quit()
    if Counter(l)[X + i]==1:
        print(l.index(X+i), l.index(i))
from collections import Counter

X = int(input())

l = [0]
i = 0
while i**5 - (i-1)**5 <= X:
    i+=1
    l.append(i**5)

for i in l:
    if Counter(l)[X - i]==1:
        print(l.index((X-i)), -l.index(i))
        quit()
    if Counter(l)[X + i]==1:
        print(l.index(X+i), l.index(i))