const Main = (input) => {
  const X = parseInt(input.trim())

  let result = ''

  for (let i = 0; i <= X; i++) {
    const A = Math.exp(Math.log(i) / 5)
    if (A - Math.floor(A) === 0) {
      const j = X - i
      const B = Math.exp(Math.log(j) / 5)
      if (B - Math.floor(B) === 0) {
        if (Math.pow(A, 5) - Math.pow(B, 5) === X) {
          result = A + ' ' + B
        } else if (Math.pow(A, 5) - Math.pow(-1 * B, 5) === X) {
          result = A + ' -' + B
        }
      }
    }
  }

  console.log(result)
  return result
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))