import scala.collection.mutable.ArrayBuffer
import scala.io.StdIn

object Main extends App {

  def pow5(x: Long) = x * x * x * x * x
  val x = StdIn.readInt()
  val map = (-1000L to 1000L).map(a => pow5(a) -> a).toMap
  val set = map.keySet
  val good = map.filter { case (k, _) => set.contains(x + k) }
  val ans = (map(x + good.head._1) , good.head._2)
  println(s"${ans._1} ${ans._2}")

  def readIntPair: (Int, Int) = {
    val Array(x, y) = StdIn.readLine().split(" ").map(_.toInt)
    (x, y)
  }
}