object Main {

  def main(args: Array[String]): Unit = {

    val x = io.StdIn.readLine().toInt

    var done = false

    for{
      a <- 1L until 100L if !done
      b <- -100L until a if !done
     } {
      val t = Math.pow(a, 5) - Math.pow(b, 5)
      if( t == x) {
        done = true
        println(s"${a} ${b}")
      }  
    }


  }

}