fun main(args: Array<String>) {
  val X = readLong()
  for (a in 0L until 10000000000L) {
    val a2 = a * a
    val a5 = a2 * a2 * a
    val d = Math.abs(X - a5)
    val b = Math.round(Math.pow(Math.E, Math.log(d.toDouble()) / 5))
    val b2 = b * b
    val b5 = b2 * b2 * b
    val p = a5 + b5
    val n = a5 - b5
//    println("$X, $a $b, $a5 + $b5 = $p, $a5 - $b5 = $n")
    if (p == X) {
      println(if (b == 0L) "$a $b" else "$a -$b")
      break
    }
    if (n == X) {
      println("$a $b")
      break
    }
  }
}

fun readString() = readLine()!!
fun readStrings() = readString().split(" ")
fun readInt() = readString().toInt()
fun readLong() = readString().toLong()
fun readInts() = readStrings().map { it.toInt() }
fun readLongs() = readStrings().map { it.toLong() }
