import java.util.*
import java.math.*
import kotlin.math.*

fun readLn()=readLine()!!
fun readInt()=readLn().toInt()
fun readInts()=readLn().split(" ").map{it.toInt()}
fun readLong()=readLn().toLong()
fun readLongs()=readLn().split(" ").map{it.toLong()}

val out=mutableListOf<String>()
fun printLine(s:String){out.add(s)}
fun output(){println(out.joinToString("\n"))}

fun main(){
    var x=readLong()
    var A=1L
    var A5=1L
    var B5=0L
    while(A5-B5<=x){
        for(B in 0 until A){
            if(A5-B*B*B*B*B==x){
                printLine("$A $B")
                output()
                return
            }
        }
        B5=A5
        A++
        A5=A*A*A*A*A
    }
    A=1L;A5=1L
    while(A5<=x){
        for(B in 1..A){
            if(A5+B*B*B*B*B==x){
                printLine("$A ${-B}")
                output()
                return
            }
        }
        A++
        A5=A*A*A*A*A
    }
}