Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
m=0
n=0
w=0
e=1
r=1
if m==0:
  while  n==0:
    u=e**5-w**5
    if u>x:
      w==0
      r+=1
      e=r
    if x==u:
      print(e,end=" ")
      print(w)
      n+=1
    else:
      e+=1
      w+=1

Fixed submission:
x=int(input())
m=0
for i in range(500):
  for k in range(500):
    w=i**5
    e=k**5
    r=k**5*-1
    if w-e==x:
      print(i,end=" ")
      print(k)
      m+=1
      break
    elif w-r==x:
      print(i,end=" ")
      print(k*-1)
      m+=1
      break
  if m==1:
    break

Buggy python submission (verdict: Runtime Error):
m=0
if m==0:
  while  n==0:
    u=e**5-w**5
    if u>x:
      r+=1
      w=r
      e=r+1
    if x==u:
      print(e,end=" ")
      print(w)
      n+=1
    else:
      e+=1

Fixed submission:
x=int(input())
m=0
for i in range(500):
  for k in range(500):
    w=i**5
    e=k**5
    r=k**5*-1
    if w-e==x:
      print(i,end=" ")
      print(k)
      m+=1
      break
    elif w-r==x:
      print(i,end=" ")
      print(k*-1)
      m+=1
      break
  if m==1:
    break

Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
a=int(x**(1/5))+1
l=list(range(a+1))
s=[]
m=0
n=0
w=0
e=1
r=0
for i in l:
  k=i**5
  l[i]=k
for i in l:
  s.append(i*-1)
p=l+s
for i in p:
  if m==1:
    break
  for q in p:
    if x==i-q:
      print(int(i**(1/5)),end=" ")
      m+=1
      if p.index(q)<=a+1:
        print(p.index(q))
      else:
        print((p.index(q)-a-1)*-1)
      break
if m==0:
  while  n==0:
    u=e**5-w**5
    if u>x:
      r+=1
      w=r
      e=r+1
    if x==u:
      print(e,end=" ")
      print(w)
      n+=1
    else:
      e+=1

Fixed submission:
x=int(input())
m=0
for i in range(500):
  for k in range(500):
    w=i**5
    e=k**5
    r=k**5*-1
    if w-e==x:
      print(i,end=" ")
      print(k)
      m+=1
      break
    elif w-r==x:
      print(i,end=" ")
      print(k*-1)
      m+=1
      break
  if m==1:
    break

Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
a=int(x**(1/5))+1
l=list(range(a+1))
s=[]
m=0
n=0
w=0
e=1
r=1
for i in l:
  k=i**5
  l[i]=k
for i in l:
  s.append(i*-1)
p=l+s
for i in p:
  if m==1:
    break
  for q in p:
    if x==i-q:
      print(int(i**(1/5)),end=" ")
      m+=1
      if p.index(q)<=a+1:
        print(p.index(q))
      else:
        print((p.index(q)-a-1)*-1)
      break
if m==0:
  while  n==0:
    u=e**5-w**5
    if u>x:
      w==0
      r+=1
      e=r
    if x==u:
      print(e,end=" ")
      print(w)
      n+=1
    else:
      e+=1
      w+=1

Fixed submission:
x=int(input())
m=0
for i in range(500):
  for k in range(500):
    w=i**5
    e=k**5
    r=k**5*-1
    if w-e==x:
      print(i,end=" ")
      print(k)
      m+=1
      break
    elif w-r==x:
      print(i,end=" ")
      print(k*-1)
      m+=1
      break
  if m==1:
    break

Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
a=int(x**(1/5))+1
l=list(range(a+1))
s=[]
m=0
n=0
w=0
e=1
r=1
for i in l:
  k=i**5
  l[i]=k
for i in l:
  s.append(i*-1)
p=l+s
for i in p:
  if m==1:
    break
  for q in p:
    if x==i-q:
      print(int(i**(1/5)),end=" ")
      m+=1
      if p.index(q)<=a+1:
        print(p.index(q))
      else:
        print((p.index(q)-a-1)*-1)
      break
if m==0:
  while  n==0:
    u=e**5-w**5
    if u>x:
      w==0
      r+=1
      e=r
    if x==u:
      print(e,end=" ")
      print(w)
      n+=1
    else:
      e+=1
      w+=1

Fixed submission:
x=int(input())
m=0
for i in range(500):
  for k in range(500):
    w=i**5
    e=k**5
    r=k**5*-1
    if w-e==x:
      print(i,end=" ")
      print(k)
      m+=1
      break
    elif w-r==x:
      print(i,end=" ")
      print(k*-1)
      m+=1
      break
  if m==1:
    break