// Original C++ solution (slower):
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds; 

using namespace std;

#define int long long

#define ll long long

#define pll pair<ll,ll>

#define pii pair<int,int>

#define mll map<ll,ll>

#define mii map<int,int>

#define mp make_pair

#define pb push_back

#define rep(i,b) for(ll (i)=0;i<(b);i++)

#define all(c) (c).begin(), (c).end()

#define F first

#define S second

#define CLR(p) memset(p, 0, sizeof(p))

#define SET(p) memset(p, -1, sizeof(p))

#define DEBUG true

#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);

//typedef long long int ll;

typedef tree<int, null_type, less<int>, rb_tree_tag, 

tree_order_statistics_node_update> new_data_set; 

const int MAX=1e6+5;

#define MOD 1000000007

/*std::cout << std::fixed;

std::cout << std::setprecision(6);*/

//(a%mod-b%mod+mod)%mod







/************************************





 

*************************************/



vector<vector<ll>>v;

ll T=0;

ll cnt1=0,cnt0=0;

vector<ll>dep;

bool visited[MAX];

vector<ll>par;

vector<ll>tin,tout;

vector<ll>col;



int countDivisibles(int A, int B, int M) 

{ 

    

    if (A % M == 0) 

        return (B / M) - (A / M) + 1; 

  

    // A is not divisible by M 

    return (B / M) - (A / M); 

} 















signed main(){

    int t=1;

    // cin>>t;

    while(t--){

        int x;

        cin>>x;

        for(int i=0;i<=1000;i++){

            for(int j=-1000;j<=1000;j++){

                int a = pow(i,5);

                int b = pow(j,5);

                // cout<<a<<" "<<b<<" ## ";

                if(a-b==x){

                    cout<<i<<" "<<j<<endl;

                    return 0;

                }



            }

        }

    }

    return 0;

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds; 

using namespace std;

#define int long long

#define ll long long

#define pll pair<ll,ll>

#define pii pair<int,int>

#define mll map<ll,ll>

#define mii map<int,int>

#define mp make_pair

#define pb push_back

#define rep(i,b) for(ll (i)=0;i<(b);i++)

#define all(c) (c).begin(), (c).end()

#define F first

#define S second

#define CLR(p) memset(p, 0, sizeof(p))

#define SET(p) memset(p, -1, sizeof(p))

#define DEBUG true

#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);

//typedef long long int ll;

typedef tree<int, null_type, less<int>, rb_tree_tag, 

tree_order_statistics_node_update> new_data_set; 

const int MAX=1e6+5;

#define MOD 1000000007

/*std::cout << std::fixed;

std::cout << std::setprecision(6);*/

//(a%mod-b%mod+mod)%mod







/************************************





 

*************************************/



vector<vector<ll>>v;

ll T=0;

ll cnt1=0,cnt0=0;

vector<ll>dep;

bool visited[MAX];

vector<ll>par;

vector<ll>tin,tout;

vector<ll>col;



int countDivisibles(int A, int B, int M) 

{ 

    

    if (A % M == 0) 

        return (B / M) - (A / M) + 1; 

  

    // A is not divisible by M 

    return (B / M) - (A / M); 

} 















signed main(){

    int t=1;

    // cin>>t;

    while(t--){

        int x;

        cin>>x;

        for(int i=0;i<=150;i++){

            for(int j=-150;j<=150;j++){

                int a = pow(i,5);

                int b = pow(j,5);

                // cout<<a<<" "<<b<<" ## ";

                if(a-b==x){

                    cout<<i<<" "<<j<<endl;

                    return 0;

                }



            }

        }

    }

    return 0;

}


// Fastest known solution for this problem: