#include<stdio.h>
#define ll long long
ll po(ll a){
    return a * a * a * a * a;
}
ll roo(ll a){
    ll i = 1;
    for(i = 1; ; i++){
        ll p = po(i);
        if(p == a)
            return i;
        if(p > a)
            return 0;
    }
}
int main(){
    ll x, i;
    ll a, b;
    scanf("%lld",&x);
    ll m = roo(x);
    ll n = roo(x - 1);
    ll l = roo(x + 1);
    if(m != 0){
        a = 0;
        b = -m;
    }
    else if(n != 0){
        b = -1;
        a = n;
    }
    else{
        b = 1;
        a = l;
    }
    printf("%lld %lld\n",a, b);
    return 0;
}