import java.lang.Math.abs

fun main(args: Array<String>) = ABC166D.main()

object ABC166D {
    fun log(message: Any?) {
        println(message)// TODO: ←消す
    }

    fun Int.sqrt() = Math.sqrt(this.toDouble()).toInt()

    fun main() {
        val X = readInt()

        val (al, be) = (1..X.sqrt()).asSequence().mapNotNull { al ->
            val al2 = al * al
            val al4 = al2 * al2

            if (X % al != 0
                || ((X / al) - al4) % 5 != 0
            ) return@mapNotNull null

            if (al4 == X / al) return@mapNotNull al to 0


            val ga = ((X / al) - al4) / 5
            val s = abs(ga)
            val beta = (1..s.sqrt()).filter { ga % it == 0 }.asSequence()
                //.filter { b -> ga % b == 0 }
                .mapNotNull { pb ->
                    val pLeft = al2 + pb
                    val pRight = ga / pb

                    val mb = -pb
                    val mLeft = al2 + mb
                    val mRight = ga / mb
                    when {
                        (pLeft == pRight) -> pb
                        (mLeft == mRight) -> mb
                        else -> null
                    }
                }.firstOrNull()
            beta?.let { al to it }
        }.first()
        //////
        val D = Math.sqrt((al * al + 4 * be).toDouble()).toInt()
        val A1 = (al + D) / 2
        val A2 = (al - D) / 2
        val B1 = A1 - al
        val B2 = A2 - al
        val ans = when {
            check(A1, B1, X) -> A1 to B1
            check(A2, B2, X) -> A2 to B2
            else -> null
        }
        println("${ans?.first} ${ans?.second}")
    }

    fun check(A: Int, B: Int, X: Int) = (A * A * A * A * A - B * B * B * B * B) == X

    /*####################################################################################*/

    fun readString() = readLine()!!
    fun readStrings() = readLine()!!.split(" ")
    fun readInt() = readLine()!!.toInt()
    fun readInts() = readLine()!!.split(" ").map { it.toInt() }
    fun readLong() = readLine()!!.toLong()
    fun readLongs() = readLine()!!.split(" ").map { it.toLong() }
    fun readMatrixRows(height: Int) = (1..height).map { readLine()!!.toList() }

    fun Boolean.yesOrNo() = if (this) "Yes" else "No"
    fun Double.toNaturalExpr() = println("%f".format(this))
}