Problem:


Score : 400 points

Problem Statement

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.

Constraints

1 \leq X \leq 10^9

X is an integer.

There exists a pair of integers (A, B) satisfying the condition in Problem Statement.

Input

Input is given from Standard Input in the following format:

X

Output

Print A and B, with space in between.
If there are multiple pairs of integers (A, B) satisfying the condition, you may print any of them.

A B

Sample Input 1

33

Sample Output 1

2 -1

For A=2 and B=-1, A^5-B^5 = 33.

Sample Input 2

1

Sample Output 2

0 -1



Sample input:
33


Sample output:
2 -1

Submission status: Wrong Answer

Solution code:
X=int(input())
a=True
for A in range(118+119):
    if(a):
        for B in range(118+119):
            if((A-118)**5+(B-118)**5==X):
                print(A-118,B-118)
                a=False
                break

Submission status: Wrong Answer

Solution code:
def main():
    X = int(input())
    for A in range(0, 201):
        for B in range(-201, 201):
            if pow(A, 5) + pow(B, 5) == X:
                print(A, B)
                return

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
X=int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if (i^5)-(j^5)==X:
      print(i,j)
      exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
bf=0
for i in range(-int(abs(x**0.2)),int(abs(x**0.2))+1):
    for j in range(-int(abs(x**0.2)), int(abs(x**0.2))+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            bf=1
            break
    if bf==1:
        break

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-int(abs(x**0.2))-1,int(abs(x**0.2))+1):
    for j in range(-int(abs(x**0.2))-1, int(abs(x**0.2))+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            break

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-int(x**0.2)-1,int(x**0.2)+1):
    for j in range(-int(x**0.2)-1, int(x**0.2)+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            break

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-int(x**0.2),int(x**0.2)):
    for j in range(-int(x**0.2), int(x**0.2)):
        if i**5-j**5==x:
            print(f"{i} {j}")
            break

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-int(x**0.2),int(x**0.2)):
    a=(x+i**5)**0.2
    if a.is_integer():
        if a**5-i**5==x:
            print(f"{int(a)} {i}")
            break

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(1000):
    a5 = pow(a,5)
    for b in range(1000):
        b5 = pow(b,5)
        if a5-b5==x:
            print(a,b);exit()
        if a5+b5==x:
            print(a,-b);exit()
        if -a5+b5==x:
            print(-a,b);exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(100):
    a5 = pow(a,5)
    for b in range(100):
        b5 = pow(b,5)
        if a5-b5==x:
            print(a,b);exit()
        if a5+b5==x:
            print(a,-b);exit()
        if -a5+b5==x:
            print(-a,b);exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

#A**5,B**5でとり得る可能性のある数をあらかじめリストで用意する

N = [i**5 for i in range(100)]
 
#A,Bで別々の数を扱うので、変数はi,jの２種を用意する

for i in range(100):
	for j in range(100):

#リストから２つの数を抽出し、Xになるか計算を繰り返す
#Xは正の整数であるため、Aが負になる可能性は除外

		if N[j] - N[i] == X:
			print(j, i)
			exit()

#Bが負の場合、符号が変わる可能性があるため、もう１パターン計算

		if N[j] + N[i] == X:
			print(j, -i)
			exit()

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())

# b<=0

for i in range(0,int(x**(1/5)+10)):
    for j in range(0,int(x**(1/5)+10)):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()


# b>0

for i in range(0,int(x**(1/5)+10)):
    for j in range(int(-x**(1/5))-2,10):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())


for i in range(0,int(x**(1/5)+2)):
    for j in range(0,int(x**(1/5)+2)):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()


# b>0

for i in range(0,int(x**(1/5)+2)):
    for j in range(int(-x**(1/5))-2,0):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()

# b<=0

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())


for i in range(0,int(x**(1/5)+1)):
    for j in range(0,int(x**(1/5)+1)):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()


# b>0

for i in range(0,int(x**(1/5)+1)):
    for j in range(int(-x**(1/5)),0):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()

# b<=0

Submission status: Wrong Answer

Solution code:
x = int(input())


for i in range(0,int(x**(1/5)+1)):
    for j in range(0,int(x**(1/5)+1)):
        if i**5 - j**5 == x:
            print(i,j)
            break


# b>0

for i in range(0,int(x**(1/5)+1)):
    for j in range(int(-x**(1/5)),0):
        if i**5 - j**5 == x:
            print(i,j)
            #break

Submission status: Wrong Answer

Solution code:
x = int(input())
for a in range(100, -100, -1):
  for b in range(-100, 100, 1):
    if x==a**5-b**5:
      print(a, b)
      exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
for a in range(1000):
  for b in range(1000):
    if x==a**5-b**5:
      print(a, b)
      exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
flag = 0

for i in range(-120,120):
    for j in range(-120,120):
        res = i**5 - j**5
        if(res == x):
            flag = 1
            break

print(i,j)

Submission status: Wrong Answer

Solution code:
x=int(input())
a5=[0]
for i in range(1,200):
  a5.append(i**5)
#
r=0
for i in range(200):
  for j in range(i+1,200):
    if a5[j]-a5[i]>x:
      break
    if a5[j]-a5[i]==x:
      print(i,j)
#

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
flag = 0

x_5 = int(math.pow(x,1/5))
#print(x_5)
for i in range(x_5+1):
    for j in range(i+1):
        res = i**5 + j**5
        if(res == x):
            flag = 1
            break

if(flag == 1):
    print(i,-j)

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
flag = 0

x_5 = int(math.pow(x,1/5))
print(x_5)
for i in range(x_5+1):
    for j in range(i+1):
        res = i**5 + j**5
        if(res == x):
            flag = 1
            break

if(flag == 1):
    print(i,-j)

Submission status: Wrong Answer

Solution code:
x=int(input())
for a in range(-400,400):
    for b in range(-400,400):
        if a^5-b^5==x:
            break
    if a^5-b^5==x:
        break
print(a,b)

Submission status: Wrong Answer

Solution code:
X = int(input())
p = int(pow(X, 1/5)+1)
flag = False
for a in range(-p, p+1):
  for b in range(-p, a):
    if a**5 - b**5 == X:
      flag = True
      print(a, b, sep = " ")
      break
  if flag:
    break

Submission status: Wrong Answer

Solution code:
X = int(input())
p = int(pow(X, 1/5))
flag = False
for a in range(-p, p):
  for b in range(-p, p):
    if a**5 - b**5 == X:
      flag = True
      print(a, b, sep = " ")
      break
  if flag:
    break

Submission status: Wrong Answer

Solution code:
X = int(input())
p = int(pow(X, 1/5))
flag = False
for a in range(p):
  for b in range(-p, a):
    if a**5 - b**5 == X:
      flag = True
      print(a, b, sep = " ")
      break
  if flag:
    break

Submission status: Wrong Answer

Solution code:
X = int(input())
p = int(pow(X, 1/5))
for a in range(p):
  for b in range(-p, a):
    if a**5 - b**5 == X:
      print(a, b, sep = " ")
      break
  else:
    continue
  break

Submission status: Wrong Answer

Solution code:
X=int(input())

ans_a=0
ans_b=0

for i in range(-100,100):
    for j in range(-100,100):
        ans=pow(i,5)-pow(j,5)
        if ans==X:
            ans_a=i
            ans_b=j

print(ans_a,ans_b)

Submission status: Wrong Answer

Solution code:
x = int(input())
a, b = 0,0
done = False
for i in range(0,2000):
    for l in range(0, -2000, -1):
        if((i**5)-(l**5)==x):
            a = i
            b = l
            done  = True
            break
    if(done):
        break
print(a,b)

Submission status: Wrong Answer

Solution code:
X = int(input())
p = int(pow(X, 1/5))
for a in range(p):
  for b in range(-p, a):
    if a**5 - b**5 == X:
      print(a, b, sep = " ")
      break

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(-100,100):
  for b in range(-100,a):
    if a**5 - b**5 == x:
      print(a,b)
      exit(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
for a in range(120):
    for b in range(-1, a):
        if a**5 - b**5 == x:
            print(a, b)
            exit()

Submission status: Wrong Answer

Solution code:
X=int(input())

B_arr=[]
x=-10**6
while x<10**6:
    B5jo=x**5
    B_arr.append(B5jo)
    x=x+1

i=0
for i in range(len(B_arr)):
    A5jo=X+B_arr[i]
    checkA=A5jo**0.2
    if(type(checkA)!=complex):
        if(checkA==int(checkA)):
            checkB=B_arr[i]
            print(int(checkA),int(-abs(checkB)**0.2))
            break
        else:
            pass
    else:
        i=i+1

Submission status: Wrong Answer

Solution code:
X=int(input())

# a=range(10**3)
B_arr=[]
x=-10**4
while x<10**4:
    B5jo=x**5
    B_arr.append(B5jo)
    x=x+1
# print(len(B_arr))

# A**5-B**5=X
# A**5=X+B**5

i=0
for i in range(len(B_arr)):
    A5jo=X+B_arr[i]
    # print(A5jo)
    checkA=A5jo**0.2
    if(type(checkA)!=complex):
        if(checkA==int(checkA)):
            # print(B_arr)
            checkB=B_arr[i]
            print(int(checkA),int(-abs(checkB)**0.2))
            break
        else:
            pass
    else:
        i=i+1

Submission status: Wrong Answer

Solution code:
X=int(input())

# a=range(10**3)
B_arr=[]
x=-10**4
while x<10**4:
    B5jo=x**5
    B_arr.append(B5jo)
    x=x+1
# print(len(B_arr))

# A**5-B**5=X
# A**5=X+B**5

i=0
for i in range(len(B_arr)):
    A5jo=X+B_arr[i]
    # print(A5jo)
    checkA=A5jo**0.2
    if(type(checkA)!=complex):
        if(checkA==int(checkA)):
            print(B_arr)
            checkB=B_arr[i]
            print(int(checkA),int(-abs(checkB)**0.2))
            break
        else:
            pass
    else:
        i=i+1

Submission status: Wrong Answer

Solution code:
X=int(input())

# a=range(10**3)
B_arr=[]
x=-10**6
while x<10**6:
    B5jo=x**5
    B_arr.append(B5jo)
    x=x+1
# print(len(B_arr))

# A**5-B**5=X
# A**5=X+B**5

i=0
for i in range(len(B_arr)):
    A5jo=X+B_arr[i]
    # print(A5jo)
    checkA=A5jo**0.2
    if(type(checkA)!=complex):
        if(checkA==int(checkA)):
            print(int(checkA),B_arr[i])
            break
        else:
            pass
    else:
        i=i+1

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())

for xi in range(-100,100):
    for yi in range(-100,100):
        if (xi**5 - yi**5)==X:
            print(xi,yi)
            sys.exit()

Submission status: Wrong Answer

Solution code:
X=int(input())


Xkon=X**0.2
if(Xkon==int(Xkon)):
    print(str(int(-Xkon))+" "+str(0))
    #break
else:
    n=1
    while n<10**5:
        A=X+(n**5)
        check=(A**0.2)
        if(check==int(check)):
            AnsA=check
            AnsB=n#-1
            print(str(int(-AnsB)+" "+str(int(-AnsA))))
            break
        else:
            n=n+1
    m=-(10**5)
    while m<0:
        A=X+(m**5)
        check=(A**0.2)
        # print(type(check))
        if(type(check)!=complex):
            if(check==int(check)):
                AnsA=-check
                AnsB=-m
                print(str(int(-AnsA))+" "+str(int(-AnsB)))
                break
            else:
                pass
        else:
            m=m+1

Submission status: Wrong Answer

Solution code:
X=int(input())


Xkon=X**0.2
if(Xkon==int(Xkon)):
    print(str(int(-Xkon))+" "+str(0))
    #break
else:
    n=1
    while n<10**5:
        A=X+(n**5)
        check=(A**0.2)
        if(check==int(check)):
            AnsA=check
            AnsB=n#-1
            print(str(int(AnsB)+" "+str(int(AnsA))))
            break
        else:
            n=n+1
    m=-(10**5)
    while m<0:
        A=X+(m**5)
        check=(A**0.2)
        # print(type(check))
        if(type(check)!=complex):
            if(check==int(check)):
                AnsA=-check
                AnsB=-m
                print(str(int(AnsA))+" "+str(int(AnsB)))
                break
            else:
                pass
        else:
            m=m+1

Submission status: Wrong Answer

Solution code:
X=int(input())


Xkon=X**0.2
if(Xkon==int(Xkon)):
    print(str(int(-Xkon))+" "+str(0))
else:
    n=1
    while n<10**5:
        A=X+(n**5)
        check=(A**0.2)
        if(check==int(check)):
            AnsA=check
            AnsB=n#-1
            print(str(int(AnsA))+" "+str(int(AnsB)))
            break
        else:
            n=n+1
m=-(10**5)
while m<0:
    A=X+(m**5)
    check=(A**0.2)
    # print(type(check))
    if(type(check)!=complex):
        if(check==int(check)):
            AnsA=-check
            AnsB=-m
            print(str(int(AnsA))+" "+str(int(AnsB)))
            break
        else:
            pass
    else:
        m=m+1

Submission status: Wrong Answer

Solution code:
X=int(input())
Xkon=X**0.2
if(Xkon==int(Xkon)):
    print(str(int(-Xkon))+" "+str(0))
else:
    n=1
    while n<10**6:
        A=X+(n**5)
        check=(A**0.2)
        if(check==int(check)):
            AnsA=check
            AnsB=n-1
            print(str(int(AnsA))+" "+str(int(AnsB)))
            break
        else:
            n=n+1

Submission status: Wrong Answer

Solution code:
X=int(input())
Xkon=X**0.2
if(Xkon==int(Xkon)):
    print(str(int(Xkon))+" "+str(0))
else:
    n=1
    while n<10**6:
        A=X+(n**5)
        check=(A**0.2)
        if(check==int(check)):
            AnsA=check
            AnsB=n-1
            print(str(int(AnsA))+" "+str(int(AnsB)))
            break
        else:
            n=n+1

Submission status: Wrong Answer

Solution code:
X=int(input())
n=0
while n<10**6:
    A=X+(n**5)
    check=(A**0.2)
    if(check==int(check)):
        AnsA=check
        AnsB=n
        print(str(int(AnsA))+" "+str(int(AnsB)))
        break
    else:
        n=n+1

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
X=int(input())
n=0
while n<10**5:
    A=X+(n**5)
    check=(A**0.2)
    if(check==int(check)):
        AnsA=check
        AnsB=n
        print(str(int(AnsA))+" "+str(int(AnsB)))
        break
    else:
        n=n+1

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(-100, 100):
    for b in range(-100, 100):
        if a**5 - b**5 == x:
            print(a, b)
            break
    else:
        continue
    break

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(-100, 100):
    for b in range(-100, 100):
        if a**5 + b**5 == x:
            print(a, b)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(-120, 120):
    for b in range(-119, 120):
        if a**5 + b**5 == x:
            print(a, b)
            exit()

Submission status: Wrong Answer

Solution code:
X=int(input())
for a in range(1000):
    for i in range(1000):
        if a**5-(a-i)**5==X:
            print(a,a-i)
            break

Submission status: Wrong Answer

Solution code:
from bisect import bisect_right as br
mem=[]
for i in range(101):
  mem.append(i**5)
#print(mem)

x=int(input())
idx=br(mem,x)
a=idx-1
x-=mem[idx-1]
#print(x)
idx1=br(mem,abs(x))
#print(idx1)
if x>0:
    b=idx1-1
else:
    b=-(idx1-1)
print(a,b)

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-100,100):
    for j in range(-100,100):
        if i**5-j**5==x:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
l = []
for i in range(65):
    l.append(i ** 5)
for i in l:
    a = int(i ** 0.2)
    b = i - x
    c = x - i
    if b in l or c in l:
        if b > 0:
            ans = int(b ** 0.2)
        else:
            ans = - int(c ** 0.2)
        print(a, ans)
        break
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(-120, 120):
  f_a = a**5
  r_b = (x-f_a)**(1/5).real
  b = round(r_b.real)
  if f_a - b**5 == x:
    print(a, b)
    break

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(120):
  f_a = a**5
  r_b = (x-f_a)**(1/5).real
  b = round(r_b.real)
  if f_a - b**5 == x:
    print(a, b)
    break
  b *= -1
  if f_a - b**5 == x:
    print(a, b)
    break

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(1, 10 ** 9):
  f_a = a**5
  r_b = (x-f_a)**(1/5).real
  b = round(r_b.real)
  if f_a - b**5 == x:
    print(a, b)
    break
  if f_a + b**5 == x:
    print(a, b)
    break

Submission status: Wrong Answer

Solution code:
X = int(input())

result = [0, 0]
powers = [x**5 for x in range(101)]

for i in range(101):
    a5 = powers[i]
    for j in range(i, 101):
        b5 = powers[j]
        x = a5 - b5
        if (x == X):
            result[0] = i
            result[1] = j
        elif (-x == X):
            result[0] = -i
            result[1] = -j
        x = a5 + b5
        if (x == X):
            result[0] = i
            result[1] = -j
        elif (-x == X):
            result[0] = -i
            result[1] = j

A, B = result
print(f"{A} {B}")

Submission status: Wrong Answer

Solution code:
import sys

x = int(input())

for i in range(-100, 100):
    for j in range(-100, 100):
        if i ** 5 - j ** 5 == x:
            print('{} {}'.format(i, j))
            sys.exit()

Submission status: Wrong Answer

Solution code:
x =int(input())

for A in range(-118,120):
    for B in range(-119,119):
        if (A**5-B**5)==x:
            print("%d %d" %(A,B))

Submission status: Wrong Answer

Solution code:
x = int(input())
# 下から
xr = int(x ** 0.2)
m = 0
for i in reversed(range(xr + 1)):
    for j in range(m,i):
        ip = i ** 5
        jp = j ** 5
        sumij = ip + jp
        if sumij < x:
            m = j
        elif sumij > x:
            break
        else:
            print(str(i) + " " + str(-1 * j))

#上から
m = 0
for i in range(xr + 1,100):
    for j in range(m,i):
        ip = i ** 5
        jp = j ** 5
        subij = ip - jp
        if subij > x:
            m = j
        elif subij < x:
            break
        else:
            print(str(i) + " " + str(j))

Submission status: Wrong Answer

Solution code:
import sys
l = sys.stdin.readline().strip()
x = int(l)
cands = []
for i in range(-121, 121):
    cands.append(i**5)
for i, one in enumerate(cands):
    for j, two in enumerate(cands):
        if one - two == x:
            print(i-121,j-121)
            break

Submission status: Wrong Answer

Solution code:
X = int(input())

A = 120
N = [x ** 5 for x in range(A)]

for j in range(1, A):
    for i in range(j, A):
        if N[i] + N[j] == X:
            print(i, -j)
            break
        elif N[i] - N[j] == X:
            print(i, j)
            break
    else: continue
    break

Submission status: Wrong Answer

Solution code:
from math import trunc

X = int(input())

A = 119

for a in range(1, A + 1):
	for b in range(1, a):
		if (a + b) == 0:
			continue
		elif X % (a + b) == 0:
			print(a, -b)
			break
		elif X % (a - b) == 0:
			print(a, b)
			break
	else: continue
	break

Submission status: Wrong Answer

Solution code:
from math import trunc

X = int(input())
P = 5

A = trunc(X ** (1/P))

for a in reversed(range(0, A + 1)):
	for b in range(0, a):
		if (a + b) == 0:
			continue
		elif X % (a + b) == 0:
			print(a, -b)
			break
		elif X % (a - b) == 0:
			print(a, b)
			break
	else: continue
	break

Submission status: Wrong Answer

Solution code:
from math import trunc

X = int(input())
P = 5

A = trunc(X ** (1/P))

for a in reversed(range(0, A + 1)):
	for b in (A * -1 + 1, A):
		if (a + b) == 0:
			continue

		elif X % (a + b) == 0:
			break
	else:
		continue
	break

print("%i %i" % (a, b))

Submission status: Wrong Answer

Solution code:
from math import trunc

X = int(input())
P = 5

A = trunc(X ** (1/P))

for a in reversed(range(0, A + 1)):
    for b in (A * -1 + 1, A):
        if (a + b) == 0:
            continue

        if X % (a + b) == 0:
            break
    else:
        continue

print("%i %i" % (a, b))

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout
import math
import bisect
import re

x = int(stdin.readline().strip())

for a in range(-100, 100):
    for b in range(-100, 100):
        if a ** 5 - b ** 5 == x:
            stdout.writelines(str(a) + ' ' + str(b) + '\n')
            exit(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
for a in range(-500, 500):
    for b in range(-500, 500):
        if a**5 - b**5 == x:
            print(a, b)

Submission status: Wrong Answer

Solution code:
x = int(input())
for i in range(-100, 101):
    for j in range(-100, 101):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(-58,58):
    for j in range(-58,58):
        l=i**5-j**5
        if l==n:
            print(i,j)
            break
    if l==n:
        break

Submission status: Wrong Answer

Solution code:
import numpy as np
x=int(input())
v=0
x_min=0
count=1
while v==0:
    if x<(count)**5-(count-1)**5:
        v=1
    else:
        x_min+=1
        count+=1
a=x_min
a=int(a)
b=int(-x+a**5)
if b<0:
    b=-1*b
    b=np.power(b,0.2)
    b=-1*b
else:
    b=np.power(b,0.2)
b=int(b)
print(a,b)

Submission status: Wrong Answer

Solution code:
import numpy as np
x=float(input())
v=0
x_min=0
count=1
while v==0:
    if x<(count)**5-(count-1)**5:
        v=1
    else:
        x_min+=1
        count+=1
a=x_min
a=int(a)
b=int(-x+a**5)
if b<0:
    b=-1*b
    b=np.power(b,0.2)
    b=-1*b
else:
    b=np.power(b,0.2)
b=int(b)
print(a,b)

Submission status: Wrong Answer

Solution code:
x = int(input())
for i in range(65):
	for j in range(65):
		if i**5 - j**5 == x:
			print(i,j)
			exit(0)
		if j**5 - i**5 == x:
			print(j,i)
			exit(0)
for i in range(65):
	for j in range(0,-65,-1):
		if i**5 - j**5 == x:
			print(i,j)
			exit(0)
		if j**5 - i**5 == x:
			print(j,i)
			exit(0)
for i in range(0,-65,-1):
	for j in range(65):
		if i**5 - j**5 == x:
			print(i,j)
			exit(0)
		if j**5 - i**5 == x:
			print(j,i)
			exit(0)
for i in range(0,-65,-1):
	for j in range(0,-65,-1):
		if i**5 - j**5 == x:
			print(i,j)
			exit(0)
		if j**5 - i**5 == x:
			print(j,i)
			exit(0)

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-118,120):
  for j in range(-119,119):
    if x==(i**5-j**5):
      print(i,j)
      break

Submission status: Wrong Answer

Solution code:

x = int(input())
for a in range(-500,500):
    for b in range(500):
        if a**5-b**5==x:
            print(a,b)
            exit()

Submission status: Wrong Answer

Solution code:

x = int(input())
for a in range(-500,500):
    for b in range(500):
        if a**5-b**5==x or b**5-a**5==x:
            print(a,b)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
for i in range(-100, 100):
  for j in range(-100, 100):
    if(i*i*i*i*i - j*j*j*j*j == x):
      print(i, j)
      exit()

Submission status: Wrong Answer

Solution code:
x=int(input())

for i in range(-1*(10**2),10**2):
    for j in range(-1*(10**2),10**2):
        if i**5-j**5==x:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(1000):
    for b in range(-1000, 1000):
        a = pow(a,5)
        b = pow(b,5)
        if a - b == x:
            print(a,b)
            exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

for a in range(-100,100,1):
	for b in range(-100,100,1):
		if a**5 - b**5 == X:
			print(a,b)
			exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
for A in range(65):
  for B in range(65):
    if (A**5) - (B**5) == X:
      print("{} {}".format(A,B))
      exit()
    elif ((-1*A)**5) - (B**5) == X:
      print("{} {}".format(-1*A,B))
      exit()
    elif (A**5) - ((-1*B)**5) == X:
      print("{} {}".format(A,-1*B))
      exit()   
    elif ((-1*A)**5) - ((-1*B)**5) == X:
      print("{} {}".format(-1*A,-1*B))
      exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

for A in range(-64, 64):
    for B in range(-64, 64):
        if (A ** 5) - (B ** 5) == X:
            print(A, B)
            break
    else:
        continue
    break

Submission status: Wrong Answer

Solution code:
X = int(input())
Num = 1
Check = "NG"

while Check == "NG":
    A_list = [i for i in range(Num)]
    B_list = [i for i in range(Num)]
    for i in range(Num):
        for j in range(Num):
            A5 = A_list[i] ** 5
            B5 = B_list[j] ** 5
            if A5 + B5 == X or A5 - B5 == X or -A5 + B5 == X:
                Check = "OK"
                break
        if Check == "OK":
            break
    if Check == "OK":
        break
    Num += 1
if A5 + B5 == X:
    print("{} -{}".format(i, j))
elif A5 - B5 == X:
    print("{} {}".format(i, j))
elif -A5 + B5 == X:
    print("-{} {}".format(i, j))

Submission status: Wrong Answer

Solution code:
import sys

x = int(input())

for i in range(-100,100):
    for j in range(-100,100):
        if j**5 == x + i**5:
            print(j,i)
            sys.exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

for b in range(-10**5,10**5):
    is_minus = False
    if (X + b**5) < 0 : is_minus = True
    result = abs((X + b**5))**(1/5)

    if type(result) is complex:
        continue
    if result - round(result) == 0:
        if is_minus:
            ans_a,ans_b = -b,-round(result)
        else:
            ans_a,ans_b = abs(b),-round(result)


print(ans_a,ans_b)

Submission status: Wrong Answer

Solution code:
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(-120, 120):
  for j in range(-120, 120):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Submission status: Wrong Answer

Solution code:
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(0, 100):
  for j in range(0, 100):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Submission status: Wrong Answer

Solution code:
X = int(input())

flag = 0
A = 0
B = 0

for i in range(0, 1000):
  for j in range(0, 1000):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Submission status: Wrong Answer

Solution code:
X = int(input())

flag = 0
A = 0
B = 0

for i in range(-100, 101):
  for j in range(-100, 101):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
print(str(A) + ' ' + str(B))

Submission status: Wrong Answer

Solution code:
X = int(input())
for i in range(0,127):
  for j in range(0,127):
    if i**5 - j**5 == X:
      print(i,j)
    elif i**5 + j**5 == X:
      print(i,-j)
    else:
      continue

Submission status: Wrong Answer

Solution code:
from sys import stdin
input = stdin.readline

from collections import deque

X = int(input())
s = {}
q = deque()
q.append((1, 0))
done = {(1, 0)}

while True:
	ab = q.popleft()
	tx = ab[0] ** 5 - ab[1] ** 5
	print(ab)
	if (tx == X):
		print(ab[0], ab[1])
		quit()
	elif (tx > X):
		if ((ab[0] - 1, ab[1]) not in done):
			q.append((ab[0] - 1, ab[1]))
			done.add((ab[0] - 1, ab[1]))
		if (ab[1] > 0 or (ab[0], ab[1] + 1) not in done):
			q.append((ab[0], ab[1] + 1))
			done.add((ab[0], ab[1] + 1))
		if (ab[1] <= 0 or (ab[0], ab[1] - 1) not in done):
			q.append((ab[0], ab[1] - 1))
			done.add((ab[0], ab[1] - 1))
	else:
		if ((ab[0] + 1, ab[1]) not in done):
			q.append((ab[0] + 1, ab[1]))
			done.add((ab[0] + 1, ab[1]))
		if (ab[1] <= 0 or (ab[0], ab[1] - 1) not in done):
			q.append((ab[0], ab[1] - 1))
			done.add((ab[0], ab[1] - 1))

Submission status: Wrong Answer

Solution code:
"""
A^5 - B^5
= (A - B)(A^4 + A^3*B + A^2*B^2 + A*B^3 + B^4)
= (A - B){(A + B) * (A^3 + B^3) + A^2*B^2}
= (A - B){(A + B)^2 * (A^2 - AB + B^2) + A^2*B^2}

-> (A + B)^2 > 1, (A^2 - AB + B^2) > 1, A^2*B^2 > 1.
"""


def main():
    print(solve())


def solve():
    X = int(input())

    for a in range(-100, 100):
        for b in range(-100, 100):
            if a ** 5 - b ** 5 == X:
                return a, b


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x=int(input())
for a in range(-118,119,1):
    for b in range(-119,118,1):
        if a**5-b**5==x:
            print(a,b)
        else:
            pass

Submission status: Wrong Answer

Solution code:
import sys
a=int(input())
for i in range(151):
  b=i**5-a
  if b>=0:
    if b**0.2==int(b**0.2):
      print(i,int(b**0.2))
      sys.exit()
  else:
    if (-b)**0.2==int((-b)**0.2):
      print(i,int(-(-b)**0.2))
      sys.exit()

Submission status: Wrong Answer

Solution code:
from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
#from functools import lru_cache   #use @lru_cache(None)
if os.path.exists('in.txt'): sys.stdin=open('in.txt','r')
if os.path.exists('out.txt'): sys.stdout=open('out.txt', 'w')
#
def input(): return sys.stdin.readline()
def mapi(arg=0): return map(int if arg==0 else str,input().split())
#------------------------------------------------------------------
x = int(input())
def power(x,y):
    res = 1
    #print(x,y)
    while y>0:
        if y%2:
            res*=x
        x*=x
        y//=2
        #print(x,y)
    return res
def bs(n):
    l = -250
    r = n+1
    while r-l>=0:
        mid = (l+r)//2
        tmp = power(mid,5)
        if tmp==n:
            return True, mid
        elif tmp<n:
            #print(mid,tmp,n)
            l = mid+1
        else:
            r = mid-1
    if power(l,5)==n:
        return True,l
    elif power(r,5)==n:
        return True,r
    return False,0
for i in range(-250,250):
    key = power(i,5)-x
    f,b = bs(key)
    if f:
        print(i,b)
        break