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 d = -1000L to 1000L
  val set = d.map(pow5).toSet
  val map = d.map(a => pow5(a) -> a).toMap
  val good = d.filter(a => set.contains(x + pow5(a)))
  println(s"${good.head} ${map(x + pow5(good.head))}")

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