import java.util.*

private val readString: ()->String = {readLine()!!}
private val readInt: ()->Int = { readLine()!!.toInt() }
private val readLong: ()->Long = { readLine()!!.toLong() }
private val readListInt: ()->List<Int> = { readLine()!!.split(' ').map(String::toInt) }
private val readListLong: ()->List<Long> = { readLine()!!.split(' ').map(String::toLong) }
private val errPrint: (String)->Unit = { msg -> System.err.println(msg) }


fun solveD(X:Long) {
    fun pow5(x: Long):Long { return x*x*x*x*x }

    for (a in 0L..1000L) {
        for (b in -a.. a) {
            if (pow5(a) - pow5(b) == X) {
                println("$a $b")
                return
            }
        }
    }
}


fun main(args: Array<String>) {
    val X = readLong()
    solveD(X)
}
