#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long

ll Mypow(ll a,ll b){
    ll i,ans=1;
    for (i=0; i<b; i++) ans*=a;
    return ans;
}

int main(){
    ll x,a=0,b=0;
    scanf("%lld",&x);
    while (x>=Mypow(a, 5)) {
        b=0;
        while (Mypow(b, 5)<=llabs(x-Mypow(a, 5))) {
            if (llabs(x-Mypow(a, 5))==Mypow(b, 5)) {
                if (x-Mypow(a, 5)>0) printf("%lld %lld\n",a,b*(-1));
                else printf("%lld %lld",a,b);
              return 0;
            }
            b++;
        }
        a++;
    }
    return 0;
}

