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

double gojo(double x){
    double jijo=x*x;
    return jijo*jijo*x;
}

int main(void){
    double x,judge,tmp;
    scanf("%lf",&x);
    int i=0;
    while(1){
        tmp=pow((gojo(i)-x),0.2);
        if(floor(tmp)==tmp){
            /*整数ならば*/
            printf("%d %d\n",i,(int)tmp);
            return 0;
        }
        i++;
    }

}
