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

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

int main()
{
    int x;
    double tmp;
    scanf("%d",&x);
    int i=0;
    double ab;
    while (1)
    {
        int flag=0;
        ab=gojo(i)-x;
        if (ab<0) {
            ab=-ab;
            flag=1;
        }
        tmp=pow(ab,0.2);
        if ((floor(tmp)==tmp)&&i>(int)tmp) {
            if (flag==1) printf("%d %d\n",i,-(int)tmp);
            else printf("%d %d\n",i,(int)tmp);
            return 0;
        }
        i++;
    }
}