import java.util.*
import kotlin.math.abs

fun main() {
    fun pow5(a: Long): Long {
        val pow2 = a * a
        return pow2 * pow2 * a
    }

    val sc = Scanner(System.`in`)

    val x = sc.nextInt().toLong()

    // https://www.wolframalpha.com/input/?i=1+%3C%3D+A%5E5-B%5E5+%3C%3D+10%5E9%2C+B+%3C+-abs%28A%29%2C+A%3D54&lang=ja
    // A = 54, B = -55
    // https://www.wolframalpha.com/input/?i=plot+%281+%3C%3D+A%5E5-B%5E5+%3C%3D+10%5E9+%2C+B+%3C+-abs%28A%29%29&lang=ja
    // https://www.wolframalpha.com/input/?i=plot+%281+%3C%3D+A%5E5-B%5E5+%3C%3D+10%5E9+%2C+A-110+%3C+B%2C+B+%3C+-abs%28A%29%29&lang=ja
    // https://www.wolframalpha.com/input/?i=1+%3C%3D+A%5E5-B%5E5+%3C%3D+10%5E9+%2C+B+%3C+-abs%28A%29%2C+A%3D-119%2C+B%3D%3F&lang=ja
    for (a in -118..54L) {
        var cnt = 0
        for (b in (a-110)..-abs(a)) {
            val res = pow5(a) - pow5(b)
            /*
            if (res in 1..1000000000) {
                println("$a $b")
                cnt++
            }
            // */
            //*
            if (res == x)
                return println("$a $b")
            // */
        }
    }
    while (true);
}

