#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#include<math.h>
#include<limits.h>

typedef long long ll;
ll ans[200]={0};
ll cal5(ll a){
    if(ans[a+100]==0) return ans[a+100] = a*a*a*a*a;
    else return ans[a+100];
}

int main(){
    ll X;
    scanf("%lld",&X);
    for(ll i=0;cal5(i)<=1000000000;i++){
        for(ll j=0;cal5(i)-cal5(j)<=1000000000;j++){
            if(cal5(i)-cal5(j)==X){
                printf("%lld %lld",i,j);
                return 0;
            }
        }
    }
    for(ll i=0;cal5(i)<=1000000000;i++){
        for(ll j=0;cal5(i)-cal5(j)<=1000000000;j--){
            if(cal5(i)-cal5(j)==X){
                printf("%lld %lld",i,j);
                return 0;
            }
        }
    }


}
