import java.io.PrintWriter

fun main(args: Array<String>) {
    PrintWriter(System.out).use { out ->
        solve(out)
        out.flush()
    }
}

fun solve(out: PrintWriter) {
    val x = readLong()

    val list = mutableListOf<Pair<Long, Long>>()
    for (i in 1..200L) {
        list += Pair(i, i * i * i * i * i)
    }

    val tmpList = list.map { Pair(-it.first, -it.second) } + Pair(0L, 0L) + list
    var ansA = 0L
    var ansB = 0L
    for (a in tmpList) {
        for (b in tmpList) {
            if (a.second - b.second == x) {
                ansA = a.first
                ansB = b.first
                break
            }
        }
    }

    println("$ansA $ansB")
}

fun readInteger() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntegerList() = readStringList().map(String::toInt)
fun readLongList() = readStringList().map(String::toLong)
fun readDoubleList() = readStringList().map(String::toDouble)