#include<stdio.h>
 
long long int FiveFactorical(long long int r){
    return r * r * r * r * r;
}
 
int main(void){
    
    long long int X,i,j,ans;
    
    scanf("%lld",&X);
 
    for(i=-500;i<= 500;i++){
        for(j = -500;j <= 500;j++){
            if(FiveFactorical(i) - FiveFactorical(j) == X){
                printf("%lld %lld\n",i,j);
                return 0;
            }
        }
    }   
    return 0;
}