#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void){
	long long X,A,B,buff,L;
	int i,flag;
	char str[10000000],buf[10000000];
 
	fgets(str, sizeof(str), stdin);
	X=strtoll(strtok(str ," "),buf,10);

	L=pow((double)X,0.2)+1;
  	if(X!=1){
	      	A=2;B=0;flag=0;
	      	while(1){
			for(B=-L;B<A;B++){
				if( X%(A-B)==0){
					buff=A*A*A*A + A*A*A*B + A*A*B*B + A*B*B*B + B*B*B*B;
					if( X%buff==0){
			                    	flag=1;
			                    	break;
	                 		 }
				}
			}
			if( flag==1){
				buff=A*A*A*A*A-B*B*B*B*B;
				if(X==buff) break;
			} 
			A++;
		}
		printf("%lld %lld\n",A,B);
	}else{
   		printf("1 0\n");   
	}

	return 0;
}