import kotlin.math.*
import java.util.*

fun main(args: Array<String>) {
  val x = readLine()!!.toLong()
  for (b in 0..119L) {
    val b5 = b * b * b * b * b
    for (a in (b + 1)..119L) {
      val a5 = a * a * a * a * a
      if (a5 - b5 == x) {
        println("${a} ${b}")
        return
      } else if (a5 + b5 == x) {
        println("${a} -${b}")
        return
      }
    }
  }
}
