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

#define pow5(r) (r*r*r*r*r)

int main(void) {

    int X;
    scanf("%d",&X);

    int f; // a^5 - b^5の倍数   
    if(X == 1){
        f = 1;
        printf("0 -1\n");
    }else{
        for(int i = 2;i <= X;i++){
            if(X%i == 0){
                f = i;

                int a_un;
                int a_up;
                int cnt = 0;
                //aの探査
                while(1){
                    if(pow5(cnt) <= X && X <= pow5((cnt+1))){
                        a_un = cnt; // こっちはbがマイナス
                        a_up = cnt + 1; // こっちはbがプラス
                        goto whileout;
                    }
                    cnt++;
                }
whileout:
                //printf("an = %d an - f:%d\n",a_un,a_un - f);
                //printf("clac %d\n",(pow5(a_un) - pow5((a_un - f))));
                //printf("ap = %d ap - f:%d\n",a_up,a_up - f);
                //printf("clac %d\n",(pow5(a_up) - pow5((a_up - f))));

                if((pow5(a_un) - pow5((a_un - f))) == X){
                    printf("%d %d\n",a_un,(a_un - f));
                    break;
                } else if((pow5(a_up) - pow5((a_up - f))) == X){
                    printf("%d %d\n",a_up,(a_up - f));
                    break;
                }
                //printf("f=%d an=%d ap=%d\n",f,a_un,a_up);
            }
        }
    }
}