object Main {

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

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


    for{
      a <- 1L until 100L
      b <- -100L until a
     } {
      val t = a*a*a*a*a - b*b*b*b*b
      if(t == x) {
        println(s"${a} ${b}")
        return
      }
    }
  }

}