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 + 200] = 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 - 199) \(j - 199)")
    //             return
    //         }
    //     }
    // }

    for i in -118..<120 {
        for j in -118..<120 {
            let pi = pow(Double(i), 5.0)
            let pj = pow(Double(j), 5.0)
            if Int(pi - pj) == X {
                print("\(i) \(j)")
                return
            }
        }
        
        // for j in −118...119 {

        // }
    }
}

main()