Buggy python submission (verdict: Time Limit Exceeded):
import math
x = int(input())
b = 0

def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    if x-b5 >= 0:
        calc(-b, -b5)
    b += 1


Fixed submission:
import math
x = int(input())
b = 0

"""
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    if x-b5 >= 0:
        calc(-b, -b5)
    b += 1
    """

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

Buggy python submission (verdict: Time Limit Exceeded):
import math
x = int(input())
b = 0

def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    calc(-b, -b5)
    b += 1


Fixed submission:
import math
x = int(input())
b = 0

"""
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    if x-b5 >= 0:
        calc(-b, -b5)
    b += 1
    """

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

Buggy python submission (verdict: Runtime Error):
import math
x = int(input())
b = 0

@njit
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    calc(-b, -b5)
    b += 1


Fixed submission:
import math
x = int(input())
b = 0

"""
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    if x-b5 >= 0:
        calc(-b, -b5)
    b += 1
    """

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

Buggy python submission (verdict: Runtime Error):
import math
x = int(input())
b = 0import math
x = int(input())
b = 0

@njit
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    calc(-b, -b5)
    b += 1


def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    calc(-b, -b5)
    b += 1


Fixed submission:
import math
x = int(input())
b = 0

"""
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    if x-b5 >= 0:
        calc(-b, -b5)
    b += 1
    """

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

Buggy python submission (verdict: Time Limit Exceeded):
import math
x = int(input())
b = 0

def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    calc(-b, -b5)
    b += 1


Fixed submission:
import math
x = int(input())
b = 0

"""
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    if x-b5 >= 0:
        calc(-b, -b5)
    b += 1
    """

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

Buggy python submission (verdict: Runtime Error):
import math
x = int(input())
b = 0

while True:
    a = math.pow(x+pow(b, 5), 0.2)
    if a.is_integer():
        print(int(a), b)
        break
    a = math.pow(x+pow(-b, 5), 0.2)
    if a.is_integer():
        print(int(a), b)
        break
    b += 1


Fixed submission:
import math
x = int(input())
b = 0

"""
def calc(b, b5):
    a = (x+b5)**0.2

    if a.real.is_integer():
        print(int(a), b)
        exit()

while True:
    b5 = b ** 5
    calc(b, b5)
    if x-b5 >= 0:
        calc(-b, -b5)
    b += 1
    """

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