fun pow5(x:Long) = x*x*x*x*x

fun main(args: Array<String>) {
    val x = readLine()!!.toLong()
    val l = -1000L..1000L
    val t = l.map{ a -> l.map{ b -> Triple(a, b, pow5(a) - pow5(b)) } }.flatten().find { it.third == x }!!
    println("${t.first} ${t.second}")
}