import Foundation
func main() {
    let inputs = readLine()!.split(separator: " ")
    let X = Int(inputs[0])!
    var fives = Array(repeating: 0, count: 400)
    for i in -200..<200 {
        fives[i + 100] = Int(pow(Double(i), 5.0))
    }
    for i in 0..<400 {
        for j in 0..<400 {
            let diff = fives[i] - fives[j]
            // print("diff: \(diff)")
            if diff == X {
                // print("i: \(i - 99) j: \(j - 99)")
                print("\(i - 99) \(j - 99)")
                return
            }
        }
    }
}

main()