#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
typedef long long ll;


int main()
{

    int x,flag=0;
    scanf("%d",&x);
    ll a=0,b=0;
    ll c,d;
    double y;
    int k;

    while(flag==0)
    {
        k=0;
        y=x;
        c=a*a*a*a*a;
        y=y-c;
        if(y<0)
        {
            y=-y;
            k=1;
        }
        b=pow(y,0.2);
        if(y==b*b*b*b*b)
        {
            flag=1;
        }
        else
        {
            a=a+1;
        }
        
    }
    

    if(k==1)
    {
        printf("%lld %lld\n",a,b);
    }
    else
    {
        printf("%lld %lld\n",a,-b);
    }
    

    return 0;
}