import Foundation
 
let c = Int(readLine()!)!
 
for a in -1 ..< 100 {
    for b in -1 ..< 100 {
        if a*a*a*a*a - b*b*b*b*b == c{
            print(String(format: "%d %d",a,b))
          break
        }
    }
}