#include <stdio.h>
#include <math.h>
int main(void){
    double x,r,ap;
    scanf("%lf",&x);
    r=pow(x,0.2);
    int t,aa,bb;
    double a,b=0;
    t=r;
    a=t;
    if(r-a<0.5){
        b=0;
        ap=pow(a,5)-x;
        while(pow(b,5)!=ap)
            b-=1;
    }
    else{
        a+=1;
        ap=pow(a,5)-x;
        while(pow(b,5)!=ap)
            b+=1;
    }
    aa=a;
    bb=b;
    printf("%d %d",aa,bb);
}