// https://atcoder.jp/contests/abc166/tasks/abc166_d

fun main() {
    abc166d()
}

fun abc166d() {
    val x = readLine()!!.toLong()
    for (a in -119L..120L) {
        for (b in -119L..120L) {
            if (a == b) continue
            if (a * a * a * a * a - (b * b * b * b * b) == x) {
                println("$a $b")
                return
            }
        }
    }
}
