x=int(eval(input()))

i=0

while True:

  for j in range(0,i+1):

    a=j

    b=i-j

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

      print((a,b))

      exit()

    a*=-1

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

      print((a,b))

      exit()

    b*=-1

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

      print((a,b))

      exit()

    a*=-1

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

      print((a,b))

      exit()

  i+=1

x=int(eval(input()))

j=0

while True:

  j+=1

  for i in range(j+1):

    a=j

    b=j-i

    if pow(a,5)-pow(b,5)==x:

      print((a,b))

      exit(0)

    b*=-1

    if pow(a,5)-pow(b,5)==x:

      print((a,b))

      exit(0)

    b*=-1

    a*=-1

    if pow(a,5)-pow(b,5)==x:

      print((a,b))

      exit(0)







x = int(eval(input()))
i = 0
while True:
    for j in range(0, i + 1):
        a = j
        b = i - j
        if a**5 - b**5 == x:
            print((a, b))
            exit()
        a *= -1
        if a**5 - b**5 == x:
            print((a, b))
            exit()
        b *= -1
        if a**5 - b**5 == x:
            print((a, b))
            exit()
        a *= -1
        if a**5 - b**5 == x:
            print((a, b))
            exit()
    i += 1

x = int(eval(input()))
j = 0
while True:
    j += 1
    for i in range(j + 1):
        a = j
        b = j - i
        if pow(a, 5) - pow(b, 5) == x:
            print((a, b))
            exit(0)
        b *= -1
        if pow(a, 5) - pow(b, 5) == x:
            print((a, b))
            exit(0)
        b *= -1
        a *= -1
        if pow(a, 5) - pow(b, 5) == x:
            print((a, b))
            exit(0)

-i = 0 +j = 0 -    for j in range(0, i + 1): +    j += 1 +    for i in range(j + 1): -        b = i - j -        if a**5 - b**5 == x: +        b = j - i +        if pow(a, 5) - pow(b, 5) == x: -            exit() +            exit(0) +        b *= -1 +        if pow(a, 5) - pow(b, 5) == x: +            print((a, b)) +            exit(0) +        b *= -1 -        if a**5 - b**5 == x: +        if pow(a, 5) - pow(b, 5) == x: -            exit() -        b *= -1 -        if a**5 - b**5 == x: -            print((a, b)) -            exit() -        a *= -1 -        if a**5 - b**5 == x: -            print((a, b)) -            exit() -    i += 1 +            exit(0)