import Foundation

let X = Int(readLine()!)!

func powFive(_ x: Int) -> Int {
    return x * x * x * x * x
}

outer: for A in -200...200 {
    for B in -200...200 {
        if powFive(A) - powFive(B) == X {
            print(A, B)
            break outer
        }
    }
}
