import java.util.Scanner

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

  Iterator.from(1).foreach { a =>
    val a5 = fiveSquare(a)
    val result = LazyList.from(0).map(b => b -> (a5 - fiveSquare(b))).takeWhile(x <= _._2).lastOption
    result.foreach { case (b, v) =>
      if(v == x) answer(a, b)
    }
    val result2 = LazyList.from(-1, -1).map { b => b -> (a5 - fiveSquare(b)) }.takeWhile(_._2 <= x).lastOption
    result2.foreach { case (b, v) =>
      if(v == 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)
  }
}
