

void main(){
	auto X = readLine!BigInt()[0];
	BigInt A=0;
	BigInt B=0; 
	

	foreach_reverse( a ; -700..700 ){
		foreach_reverse(  b ; -700..700 ){
			//if ( a.pow(5) - b.pow(5) == X ){
			if ( cast(BigInt)a*a*a*a*a - cast(BigInt)b*b*b*b*b == X ){
				writeln( a," ",b );
				return;
			}
		}
	}

}


import std;


string readStr(){
	return readln().chomp();
}
T[] readLine( T = long )(){
	return readln().split().to!(T[])();
}