const main = (input) => {
  const s = Number(input.trim())

  for (let x=0; x<=100; x++) {
    for (let y=-100; y<=99; y++) {
      if (x**5 - y**5 === s) return console.log(`${x} ${y}`)
    }
  }
}

process.env.MYTEST
  ? (process.env.MYTEST === 'test' ? test() : main(require('fs').readFileSync('dev/stdin', 'utf8')))
  : main(require('fs').readFileSync('/dev/stdin', 'utf8'))