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

int main()
{
    int x,i,res1,res2,a,b;
    float a1,a2;
    scanf("%d",&x);
    for(i=1;i<=100000000;i++){
        res1 = x+pow(i,5);
        res2 = x+pow(-i,5);
        a1 = pow(res1,0.2);
        a2 = pow(res2,0.2);
        if(a1 == (int)a1){
            a = (int)a1;
            b = i;
            break;
        }
        else if(a2 == (int)a2){
            a = (int)a2;
            b = -i;
            break;
        }
    }
    printf("%d %d",a,b);
    return 0;
}
