Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())

for i in range(1, x+1):
    if x % i != 0:
        continue
    else:
        for a in range(x):
            b = a - i
            if a**5 - b**5 == x:
                ans_a = a
                ans_b = b
                break
        if a**5 - b**5 == x:
            break

print(ans_a, ans_b)


Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())
flg = 0

for i in range(1, x+1):
    if x % i != 0:
        continue
    else:
        for a in range(x):
            b = a - i
            if a**5 - b**5 == x:
                ans_a = a
                ans_b = b
                flg = 1
                break
            elif a > i and a**5 - b**5 > x:
                flg = -1
                break
        if flg == 1:
            break
        elif flg == -1:
            flg = 0
            continue

print(ans_a, ans_b)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())
s_candidates = []


for i in range(1, x+1):
    if x % i != 0:
        continue
    else:
        for a in range(x):
            b = a - s
            if a**5 - b**5 == x:
                ans_a = a
                ans_b = b
                break
        if t == tmp:
            break

print(ans_a, ans_b)


Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())
flg = 0

for i in range(1, x+1):
    if x % i != 0:
        continue
    else:
        for a in range(x):
            b = a - i
            if a**5 - b**5 == x:
                ans_a = a
                ans_b = b
                flg = 1
                break
            elif a > i and a**5 - b**5 > x:
                flg = -1
                break
        if flg == 1:
            break
        elif flg == -1:
            flg = 0
            continue

print(ans_a, ans_b)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())
s_candidates = []


for i in range(1, x+1):
    if x % i == 0:
        s_candidates.append(i)

for s in s_candidates:
    for a in range(x):
        b = a - s
        t = x / s
        tmp = a**4 + (a**3) * b + (a**2) * (b**2) + a * (b**3) + b**4
        if t == tmp:
            ans_a = a
            ans_b = b
            break
    if t == tmp:
        break

print(ans_a, ans_b)


Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())
flg = 0

for i in range(1, x+1):
    if x % i != 0:
        continue
    else:
        for a in range(x):
            b = a - i
            if a**5 - b**5 == x:
                ans_a = a
                ans_b = b
                flg = 1
                break
            elif a > i and a**5 - b**5 > x:
                flg = -1
                break
        if flg == 1:
            break
        elif flg == -1:
            flg = 0
            continue

print(ans_a, ans_b)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())
s_candidates = []


for i in range(1, x):
    if x % i == 0:
        s_candidates.append(i)

for s in s_candidates:
    for a in range(x):
        b = a - s
        t = x / s
        tmp = a**4 + (a**3) * b + (a**2) * (b**2) + a * (b**3) + b**4
        if t == tmp:
            ans_a = a
            ans_b = b
            break
    if t == tmp:
        break

print(ans_a, ans_b)


Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

x = int(input())
flg = 0

for i in range(1, x+1):
    if x % i != 0:
        continue
    else:
        for a in range(x):
            b = a - i
            if a**5 - b**5 == x:
                ans_a = a
                ans_b = b
                flg = 1
                break
            elif a > i and a**5 - b**5 > x:
                flg = -1
                break
        if flg == 1:
            break
        elif flg == -1:
            flg = 0
            continue

print(ans_a, ans_b)