import scala.io.StdIn._
object Main {
  def main(args:Array[String]) {
    val X = readLine().toLong

    var ansA = 0
    var ansB = 0
    for(A <- -118 to 119; B <- -119 to 118) {
      if(Math.pow(A, 5) + Math.pow(B, 5) == X) {
        ansA = A
        ansB = B
      }
    }
    println(ansA + " " + ansB)
  }
}
