fun main() {
    val x = readLine()!!.toLong()

    for(a in 0..150) {
        var A = 1L
        repeat(5){
            A *= a.toLong()
        }
        for(b in 0..150) {
            var B = 1L
            repeat(5) {
                B *= b.toLong()
            }
            if(A - B == x ) {
                print("$a $b")
                return
            } else if(A + B == x) {
                print("$a -$b")
                return
            }
        }

    }


}