import math._
object Main extends App {
  val in = new java.util.Scanner(System.in)
  val X = in.nextInt

  val is = (-200 to 200).map(l => l.toLong*l*l*l*l).toArray

  val (a, b) = (for {
    a <- is
    b <- is
    if (a - b == X)
  } yield (a, b)).head

  def rt5(l: Long): Long = (pow(abs(l), 0.2) + 0.1).toLong * l.sign

  println(s"${rt5(a)} ${rt5(b)}")
}