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