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

int main(void){
int x;
scanf("%d",&x);
if(x==1){printf("1 0");return 0;}
int a,b;
int wareru;
for(int i=2;i<=x;i++){
    if(x%i==0){wareru=i;break;}
}
for(int i=-100;i<=100;i++){
    for(int j=-100;j<=100;j++){
        if(i-j==wareru){
            if((int)pow(i,5)-(int)pow(j,5)==x){printf("%d %d\n",i,j); return 0;}
        }
    }
}


}