fun main() = abc166d()

@OptIn(ExperimentalStdlibApi::class)
fun abc166d() {
    val x = readLine()!!.toLong()

    val set = mutableSetOf<Long>()

    for (i in -500L..500L) {
        set.add(pow(i, 5))
    }

    val list = set.sorted().toLongArray()

    for (left in list.indices) {
        for (right in list.indices) {
            if (list[left] - list[right] == x) return println("${left - 500} ${right - 500}")
        }
    }

    error("nande?")
}

private fun pow(n: Long, p: Long): Long = (1L..p).fold(1L) { acc, i -> acc * n }
