Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
S = A - 4
w = 0
while w != 1:
    Q = S ** 5 - X
    if Q < 0:
        B = 0
        while (Q < B**5):
            B -= 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
        
    elif Q > 0:
        B = 0
        while (Q > B**5):
            B += 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
    else:
        B = 0
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
S = A - 7
w = 0
while w != 1:
    Q = S ** 5 - X
    if Q < 0:
        B = 0
        while (Q < B**5):
            B -= 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
        
    elif Q > 0:
        B = 0
        while (Q > B**5):
            B += 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
S = A - 4
w = 0
while w != 1:
    Q = S ** 5 - X
    if Q < 0:
        B = 0
        while (Q < B**5):
            B -= 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
        
    elif Q > 0:
        B = 0
        while (Q > B**5):
            B += 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
S = A - 1
w = 0
while w != 1:
    Q = S ** 5 - X
    if Q < 0:
        B = 0
        while (Q < B**5):
            B -= 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
        
    elif Q > 0:
        B = 0
        while (Q > B**5):
            B += 1
        if (Q == B**5):
            w += 1
        else:
            S += 1
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
S = A - 1
w = 0
while w != 1:
    P = S ** 5
    Q = P - X
    if Q < 0:
        B = 0
        while (Q != B**5):
            B -= 1
            if Q>(B**5):
                break
        if (Q == B**5):
            w += 1
        else:
            S += 1
        
    elif Q > 0:
        B = 0
        while (Q != B**5):
            B += 1
            if Q<(B**5):
                break
        if (Q == B**5):
            w += 1
        else:
            S += 1
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)

Buggy python submission (verdict: Runtime Error):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
w = 0
while w != 1:
    P = S ** 5
    Q = P - X
    B = 0
    while (Q < B**5):
        B += 1
    if (Q == B**5):
        w += 1
    else:
        S += 1

        
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
S = A - 1
w = 0
while w != 1:
    P = S ** 5
    Q = P - X
    if Q < 0:
        B = 0
        while (Q != B**5):
            B -= 1
            if Q>(B**5):
                break
        if (Q == B**5):
            w += 1
        else:
            S += 1
        
    elif Q > 0:
        B = 0
        while (Q != B**5):
            B += 1
            if Q<(B**5):
                break
        if (Q == B**5):
            w += 1
        else:
            S += 1
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
A = 1
K = 1
while K < X:
    A += 1
    K = A ** 5
S = A - 2
w = 0
while w != 1:
    P = S ** 5
    Q = P - X
    if Q < 0:
        B = 0
        while (Q != B**5):
            B -= 1
            if Q>(B**5):
                break
        if (Q == B**5):
            w += 1
        else:
            S += 1
        
    elif Q > 0:
        B = 0
        while (Q != B**5):
            B += 1
            if Q<(B**5):
                break
        if (Q == B**5):
            w += 1
        else:
            S += 1
print(S,B)

Fixed submission:
X = int(input())
for i in range (240):
    for j in range (240):
        s = (i -120)**5 - (j -120)**5
        if s == X:
            A = i-120
            B = j -120
print(A,B)