X = int(eval(input()))

#print(X)

n = X

div = []

for i in range(1, int(n**0.5)+1):

  if n % i == 0:

    div.append(i)

    if i != n // i:

      div.append(n//i)

#print(div)



for i in div:

  for a in range(0, 10001): 

    b = a - i

    #print(a, b)

    if a**5 - b**5 == X:

      print((a, b))

      break

  else:

    continue

  break

   

    
X = int(eval(input()))

#print(X)

n = X

div = []

for i in range(1, int(n**0.5)+1):

  if n % i == 0:

    div.append(i)

    if i != n // i:

      div.append(n//i)

#print(div)



for i in div:

  for a in range(0, 1001): 

    b = a - i

    #print(a, b)

    if a**5 - b**5 == X:

      print((a, b))

      break

  else:

    continue

  break
X = int(eval(input()))
# print(X)
n = X
div = []
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        div.append(i)
        if i != n // i:
            div.append(n // i)
# print(div)
for i in div:
    for a in range(0, 10001):
        b = a - i
        # print(a, b)
        if a**5 - b**5 == X:
            print((a, b))
            break
    else:
        continue
    break

X = int(eval(input()))
# print(X)
n = X
div = []
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        div.append(i)
        if i != n // i:
            div.append(n // i)
# print(div)
for i in div:
    for a in range(0, 1001):
        b = a - i
        # print(a, b)
        if a**5 - b**5 == X:
            print((a, b))
            break
    else:
        continue
    break

-    for a in range(0, 10001): +    for a in range(0, 1001):