Buggy python submission (verdict: Time Limit Exceeded):
import sys
############
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

def main():
    X = int(input())
    divs = make_divisors(X)
    for d in divs:
        if (X-pow(d,5))%10!=0:
            continue
        for i in range(-d,X):
            Y=pow(i+d,5)-pow(i,5)
            if Y==X:
                print(i+d,i)
                sys.exit()
            elif Y>X and i>0:
                break

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin python3
# -*- coding: utf-8 -*-

import sys

def main():
    X = int(input())
    for a in range(-200, 200):
        a5 = pow(a,5)
        for b in range(-200, 200):
            b5 = pow(b,5)
            if a5-b5 == X:
                print(a,b)
                sys.exit()

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-



import sys
############
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

def main():
    X = int(input())
    divs = make_divisors(X)
    for d in divs:
        tm = X-pow(d,5)
        if tm%10!=0:
            continue
        divss = make_divisors(abs(tm)//(5*d))
        divss += [0]
        for b in divss:
            Y=pow(b+d,5)-pow(b,5)
            Y_=pow(-b+d,5)-pow(-b,5)
            if Y==X:
                print(b+d,b)
                sys.exit()
            elif Y_==X:
                print(-b+d,-b)
                sys.exit()

if __name__ == '__main__':
    main()

Fixed submission:
#!/usr/bin python3
# -*- coding: utf-8 -*-

import sys

def main():
    X = int(input())
    for a in range(-200, 200):
        a5 = pow(a,5)
        for b in range(-200, 200):
            b5 = pow(b,5)
            if a5-b5 == X:
                print(a,b)
                sys.exit()

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-



import sys
############
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

def main():
    X = int(input())
    divs = make_divisors(X)
    for d in divs:
        if (X-pow(d,5))%10!=0:
            continue
        for i in range(-d,X):
            Y=pow(i+d,5)-pow(i,5)
            if Y==X:
                print(i+d,i)
                sys.exit()
            elif Y>X and i>0:
                break

if __name__ == '__main__':
    main()

Fixed submission:
#!/usr/bin python3
# -*- coding: utf-8 -*-

import sys

def main():
    X = int(input())
    for a in range(-200, 200):
        a5 = pow(a,5)
        for b in range(-200, 200):
            b5 = pow(b,5)
            if a5-b5 == X:
                print(a,b)
                sys.exit()

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-



import sys
############
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

def main():
    X = int(input())
    divs = make_divisors(X)
    for d in divs:
        if (X-pow(d,5))%5 !=0:
            continue
        for i in range(-d,X):
            Y=pow(i+d,5)-pow(i,5)
            if Y==X:
                print(i+d,i)
                sys.exit()
            elif Y>X and i>0:
                break

if __name__ == '__main__':
    main()

Fixed submission:
#!/usr/bin python3
# -*- coding: utf-8 -*-

import sys

def main():
    X = int(input())
    for a in range(-200, 200):
        a5 = pow(a,5)
        for b in range(-200, 200):
            b5 = pow(b,5)
            if a5-b5 == X:
                print(a,b)
                sys.exit()

if __name__ == '__main__':
    main()