import java.io.PrintWriter

fun main() {
    val pw = PrintWriter(System.out)

    val x = readInputLine().toLong()

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

    for (a in LongRange(-1000L, 1000)) {
        val a5 = pow5(a)
        if (a5 >= x) {
            for (b in LongRange(0L, 1000L)) {
                val b5 = pow5(b)
                if (a5 - b5 == x) {
                    pw.println("$a $b")
                    pw.flush()
                    return
                }
                if (a5 - b5 < x) {
                    break
                }
            }
        } else {
            for (b in LongRange(-1000L, 0L).reversed()) {
                val b5 = pow5(b)
                if (a5 - b5 == x) {
                    pw.println("$a $b")
                    pw.flush()
                    return
                }
                if (a5 - b5 > x) {
                    break
                }
            }
        }
    }

    /*
    pw.println(ans)

    pw.flush()
     */
}

fun readInputLine(): String {
    return readLine()!!
}
