Buggy python submission (verdict: Runtime Error):
X=int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
L=make_divisors(X)
#print(L)
Y=False
ans=[]
for x in L:
    a=0
    while True:
        tmp=a**5-(a-x)**5
        if tmp==X:
            Y=True
            ans=[a,a-x]
            break
        if tmp>X:
            break
        a+=1
        #print(tmp)
    if Y:
        break
print(ans[0],ans[1])

Fixed submission:
X=int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
L=make_divisors(X)
Y=False
ans=[]
for x in L:
    a=0
    while True:
        tmp=a**5-(a-x)**5
        if tmp==X:
            Y=True
            ans=[a,a-x]
            break
        if tmp>X and a>int(X**0.2)+1:
            break
        a+=1
        
    if Y:
        break
print(ans[0],ans[1])

Buggy python submission (verdict: Runtime Error):
X=int(input())
def PrimeFactor(n):
    ret=[]
    for i in range(2,int(-(-n**0.5//1))+1):
        if i!=2 and i%2==0:
            continue
        cnt=0
        while n%i==0:
            cnt+=1
            n//=i
        if cnt!=0:
            ret.append([i,cnt])
    if n!=1:
        ret.append([n,1])
    return ret
L=PrimeFactor(X)
L.append([1,1])
Y=False
ans=[]
for l in L:
    x=l[0]
    b=-1*x-1
    while True:
        tmp=(b+x)**5-b**5
        if tmp==X:
            Y=True
            ans=[b+x,b]
            break
        if tmp>X and b>0 and b+x>0:
            break
        b+=1
    if Y:
        break
print(ans[0],ans[1])

Fixed submission:
X=int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
L=make_divisors(X)
Y=False
ans=[]
for x in L:
    a=0
    while True:
        tmp=a**5-(a-x)**5
        if tmp==X:
            Y=True
            ans=[a,a-x]
            break
        if tmp>X and a>int(X**0.2)+1:
            break
        a+=1
        
    if Y:
        break
print(ans[0],ans[1])

Buggy python submission (verdict: Runtime Error):
X=int(input())
def PrimeFactor(n):
    ret=[]
    for i in range(2,int(-(-n**0.5//1))+1):
        if i!=2 and i%2==0:
            continue
        cnt=0
        while n%i==0:
            cnt+=1
            n//=i
        if cnt!=0:
            ret.append([i,cnt])
    if n!=1:
        ret.append([n,1])
    return ret
L=PrimeFactor(X)
L.append([1,1])
Y=False
ans=[]
for l in L:
    x=l[0]
    b=-1*x-1
    while True:
        tmp=(b+x)**5-b**5
        if tmp==X:
            Y=True
            ans=[b+x,b]
            break
        if tmp>X and b+x>0:
            break
        b+=1
    if Y:
        break
print(ans[0],ans[1])

Fixed submission:
X=int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
L=make_divisors(X)
Y=False
ans=[]
for x in L:
    a=0
    while True:
        tmp=a**5-(a-x)**5
        if tmp==X:
            Y=True
            ans=[a,a-x]
            break
        if tmp>X and a>int(X**0.2)+1:
            break
        a+=1
        
    if Y:
        break
print(ans[0],ans[1])