import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val x = sc.nextInt()

  val MaxAB = 119

  for {
    a <- -MaxAB to MaxAB
    b <- -MaxAB to MaxAB
    if fiveSquare(a) - fiveSquare(b) == x
  } answer(a, b)


  def fiveSquare(n: Int) = n * n * n * n * n
  def check(flg: Boolean, a: Int, b: Int): Unit = {
    if(flg) answer(a, b)
  }
  def answer(a: Int, b: Int): Nothing = {
    println(s"${a} ${b}")
    sys.exit(0)
  }
}
