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

    var A = 0d
    var B = 0
    var flag = true
    var i = 1
    while(flag) {
      if(i % 2 == 0) B += 1
      else B *= -1
      A = Math.pow(X + Math.pow(B, 5), 1d / 5)
      if(A - A.toInt == 0) flag = false
      i += 1
    }
    println(A.toInt + " " + B)
  }
}


