import Foundation

let c = Int(readLine()!)!

for_i: for a in -10 ..< 1000 {
    for b in -10 ..< 1000 {
        if a*a*a*a*a - b*b*b*b*b == c{
            print(String(format: "%d %d",a,b))
            break for_i
        }
    }
}