

X = int(eval(input()))



def make_div(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 f(x, y):

  return x**5 - y**5 - X



Flag = True



for A in range(-1000, 1000):

  if Flag:

    for i in make_div(X):

      B = A - i

      if f(A, B) == 0:

        print((A, B))

        Flag = False

        break

  else:

    break

X = int(eval(input()))



def make_div(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 f(x, y):

  return x**5 - y**5 - X



Flag = True



for A in range(-120, 120):

  if Flag:

    for i in make_div(X):

      B = A - i

      if f(A, B) == 0:

        print((A, B))

        Flag = False

        break

  else:

    break

X = int(eval(input()))


def make_div(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 f(x, y):
    return x**5 - y**5 - X


Flag = True
for A in range(-1000, 1000):
    if Flag:
        for i in make_div(X):
            B = A - i
            if f(A, B) == 0:
                print((A, B))
                Flag = False
                break
    else:
        break

X = int(eval(input()))


def make_div(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 f(x, y):
    return x**5 - y**5 - X


Flag = True
for A in range(-120, 120):
    if Flag:
        for i in make_div(X):
            B = A - i
            if f(A, B) == 0:
                print((A, B))
                Flag = False
                break
    else:
        break

-for A in range(-1000, 1000): +for A in range(-120, 120):