function main(input) {
  const x = Number(input)
  for (let a = -118; a <= 119; a++) {
    for (let b = -119; b <= 118; b++) {
      if (a ** 5 - b ** 5 === x) {
        console.log(`${a} ${b}`)
        return
      }
    }
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))