// Bismillahir Rahmanir Rahim  //
// Tanbir Ahmed  << RibNat >>  //
// University of Barisal       //



#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define     fast            ios_base::sync_with_stdio(false);cin.tie(NULL)
#define     in1(X)          scanf("%lli",&(X))
#define     ins(S)          scanf("%s",(S))
#define     out(X)          printf("%lli",(X))
#define     outs(S)         printf("%s",(S))
#define     Pnl             printf("\n")
#define     End             return 0
#define     ll              long long int
#define     Pair            pair<ll,ll>
#define     F               first
#define     S               second
#define     all(v)          v.begin(),v.end()
#define     mem(a,v)        memset(a,v,sizeof(a))
#define     Max             1000000000000000014
#define     Min             -1000000000000000014
#define     mod             1000000007
#define     range           100007

#define     pb              push_back
#define     Vector          vector<ll>
#define     mp              make_pair
#define     PI              3.1415926535897
#define     min_heap        priority_queue <ll, vector<ll>, greater<ll> >
#define     ordered_set     tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>  //*(x.find_by_order(k)),x.order_of_key(k)

/*************** #Template FUNCTIONS# **************/

// ll pc;void PrintCase(){printf("Case %lli: ",++pc);}
// ll GCD(ll a,ll b){if(a<0) a*=-1;if(b<0) b*=-1;if(a<b)swap(a,b);if(b==1) return 1;if(!b) return a;if(!(a%b)) return b;else return GCD(b,a%b);}
//  ll LCM(ll a,ll b){ll x=GCD(a,b);return (a/x)*b;}
// ll bigmod(ll n,ll p){if(p==0) return 1;if(p==1)return (n+mod)%mod;if(p%2)return (bigmod(n,p-1)*n+mod)%mod;else{ll x=bigmod(n,p/2);return (x*x+mod)%mod;}}
 ll power(ll n,ll p){if(p==0) return 1;if(p==1)return n;if(p%2)return power(n,p-1)*n;else{ll x=power(n,p/2);return x*x;}}
// ll modinverse(ll n){return bigmod(n,mod-2)%mod;}
// ll Check(ll n,ll i){return (n&(1LL<<i));}
// ll Set(ll n,ll i){return (n|(1LL<<i));}
// ll status[(ll)range/64+5];Vector primes;void sieve(){for(ll i=3;i<=sqrt(range);i+=2){if(Check(status[i/64],i%64)==0){for(ll j=i*i;j<range;j+=2*i){status[j/64]=Set(status[j/64],j%64);}}}primes.pb(2);for(ll i=3;i<range;i+=2)if(Check(status[i/64],i%64)==0)primes.pb(i);}

// ll dx[] = {-2, -1, 1, 2,  2,  1, -1, -2};
// ll dy[] = { 1,  2, 2, 1, -1, -2, -2, -1};

// ll X[]= {0,0,1,-1,1,1,-1,-1};
// ll Y[]= {1,-1,0,0,1,-1,1,-1};

/********************** START **********************/


int main(){
    ll a[1000],b[1000];
    ll i,j,k,x,y,z;
    a[0]=0;b[0]=0;
    for(i=1; i<=200; i++){
        a[i]=power(i,5);
    }
    // for(i=-1; i>=-200; i--){
    //     b[abs(i)]=power(i,5);
    // }

    cin>>z;


    for(i=0; i<200; i++){
        x=a[i];
        y=x-z;
        if(y>=0){
            ll m=lower_bound(a,a+200,y)-a;
            if(y==a[m]){
                //cout<<"ok"<<endl;
                cout<<i<<' '<<m<<endl;
                break;
            }
        }
        else{
            y=abs(y);
            ll n=lower_bound(a,a+200,y)-a;
            if(y==a[n]){
                //cout<<"ok2"<<endl;
                cout<<i<<' '<<-n<<endl;
                break;
            }
        }

    }


}



/*******      ALHAMDULILLAH     *********/  
/*******      Happy Coding      *********/


Measured memory_bytes: 3660