#include <stdio.h>

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

int main(void){
    unsigned long x,judge;
    scanf("%ld",&x);
    int i,j;
    for(i=0;1;i++){
        for(j=i-1;1;j--){
            if(x%(i-j)!=0){
                continue;
            }
            judge=gojo(i)-gojo(j);
            if(judge==x){
              printf("%d %d\n",i,j);
              return 0;
            }
            if(judge>33){
                break;
            }
        }
    }
    return 0;
}
