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

int main(void){
    long int X,i;
    scanf("%ld",&X);
    long int A=pow((double)X,0.2);
    //B<0
    for(i=A;i>0;i--){
        long int c=pow(i,5);//A^5
        long int B=pow((X-c),0.2);//(A^5-X)^(1/5)
        if((long int)(pow(i,5)+pow(B,5))==X){
           printf("%ld %ld\n",i,-B);
           return 0;
        }
    }
    //B>0
    i=A+1;
    while(1){    
        long int c=pow(i,5);
        long int B=pow(c-X,0.2);
        if((long int)(pow(i,5)-pow(B,5))==X){
           printf("%ld %ld\n",i,B);
           return 0;
        }
        i++;
    }
    return 0;
}