// I hate Factorization

func main() {
    let x = Int(readLine()!)!
    for i in 1...120 {
        for j in -120..<i {
            let result = i * i * i * i * i - j * j * j * j * j
            if result == x {
                print("\(i) \(j)")
                return
            }
        }
    }
}

main()