import java.util.Scanner

import scala.collection.mutable
import scala.math._

object Helper {

  implicit class LongImplicits(val i: Long) {
    def isEven = i % 2 == 0

    def isOdd = !isEven

    def **(exp: Long): Long = scala.math.pow(i, exp).longValue
  }

}

object Main {

  def main(args: Array[String]): Unit = {
    import Helper._
    val sc = new Scanner(System.in)
    val x = sc.nextInt()

    val ans = (for {
      a <- (-150L to 150L).to(LazyList)
      b <- (-150L to 150L).to(LazyList)
      if (x == a ** 5 - b ** 5)
    } yield s"$a $b"
      ).head
    println(ans)
  }
}
