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

#define rep(i,k,n) for(int (i)=(k);(i)<(n);(i)++)
#define max(a,b) (a)>(b)?(a):(b)
#define min(a,b) (a)<(b)?(a):(b)
#define abs(a) (a)>0 ?(a):-(a)
#define llong long long

llong check(llong A,llong X){
	llong B = A*A*A*A*A - X;
	if( B==0 ) return 0;
	if( B==1 ) return 1;
	if( B==-1 ) return -1;
	llong ans=1;
	if( B<0 ){
		B = -B;
		ans = -ans;
	}
	int cnt2=0;
	while( B%2==0 ){
		B /= 2;
		cnt2++;
	}
	if( cnt2%5!=0 ) return 0;
	cnt2 /= 5;
	rep(i,0,cnt2) ans*=2;
	for(int i=3;B!=1;i+=2){
		int cnt=0;
		while( B%i==0 ){
			B /= i;
			cnt++;
		}
		if( cnt%5==0 ){
			cnt /= 5;
			rep(j,0,cnt) ans *= i;
		}else{
			return 0;
		}
	}
	return ans;
}

int main(){
	llong X; scanf("%lld",&X);
	llong A=0,B;
	while(1){
		if( A*A*A*A*A==X ){
			printf("%lld 0",A,B);
			break;
		}
		if( B=check(A,X) ){
			printf("%lld %lld",A,B);
			break;
		}
		A++;
	}
	return 0;
}

