import kotlin.math.pow

fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)
fun <T> Array<Array<T>>.print() {
    this.forEach {
        println(it.joinToString(" "))
    }
}

fun main() {
    val x = readLong()

    val a = Array(120) { it.toDouble().pow(5).toLong() }
    for (i in 0 until 120) {
        for (j in i + 1 until 120) {
            if (a[j] - a[i] == x) {
                println("$j $i")
                return
            }
            if (a[j] + a[i] == x) {
                println("$j -$i")
                return
            }
        }
    }
}
