#include<stdio.h>
typedef long long ll;
int main(){
    ll x,ans_a,ans_b;
    ll a,b;
    
    scanf("%lld",&x);
    for(a = -200; a <= 200; a++){
        for(b = -200; b <= 200; b++){
            if((a*a*a*a*a) - (b*b*b*b*b) == x){
                ans_a = a;
                ans_b = b;
                break;
            }
        }
    }
    printf("%lld %lld\n",ans_a,ans_b);
}
