#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 = -200;i <= 200;i++){
        for(j = -200;j <= 200;j++){
            if(FiveFactorical(i)+FiveFactorical(j) == X){
                printf("%lld %lld\n",i,j);
                return 0;
            }
        }
    }
    
    return 0;
}