import java.util

import scala.io.StdIn.readLine
import scala.io.StdIn.readInt
import java.util.Scanner
import java.util.ArrayList

object Main extends App {
  val sc = new Scanner(System.in)
  val x = sc.nextLong()
  val f = (x:Long)=>x*x*x*x*x
  for(i <- -1000 to 1000 ;j<- -1000 to 1000){
    if(f(i) - f(j) == x){
      println(f"$i $j")
      System.exit(1)
    }
  }





}