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

fun main() {
	val scn = Scanner(System.`in`)
	val x = scn.nextDouble()
	var a = 0L
	while(true){
		val a5 = Math.pow(a.toDouble(), 5.0)
		if (a5==x){
			println("$a 0")
			return
		}else {
			var b = Math.pow(a5-x, 0.2)
			if (b.isNaN()) b = -Math.pow(x-a5, 0.2)
			if (a5 - Math.pow(floor(b), 5.0)==x){
				println("$a ${floor(b).toLong()}")
				return
			}else if (a5 - Math.pow(ceil(b), 5.0)==x){
				println("$a ${ceil(b).toLong()}")
				return
			}
		}
		a++
	}
}