#include "bits/stdc++.h"
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rep(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

vector<long long> divisor(long long n) {
    vector<long long> ret;
    for (long long i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ret.push_back(i);
            if (i * i != n) ret.push_back(n / i);
        }
    }
    sort(ret.begin(), ret.end()); // 昇順に並べる
    return ret;
}
ll x;

ll fiv(ll num){
    ll ans = 1;
    rep(i,5){
        ans *= num;
    }
    return ans;
}

ll fun(ll xx,ll tt){
    return fiv(xx+tt) - fiv(xx) - x;
}

bool ck(ll xx,ll t){
    if(fun(xx,t)>=0)return true;
    else return false;
}

int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(30);
    cin>>x;
    Vi v = divisor(x);
    bool fg =false;
    PLL ans;
    for(auto& t: v){
        ll tp = -(t/2);
        ll tp2 = -(t/2)-1;
        if(tp%2==0){
            tp2 = tp;
        }
        if(fun(tp,t)>0 && fun(tp2,t)>0)continue;
        if(fun(tp,t)==0){
            fg = true;
            ans = mp(tp+t,tp);
            break;
        }
        if(fun(tp2,t)==0){
            fg = true;
            ans = mp(tp2+t,tp2);
            break;
        }
        if(fun(tp,t)<0){
            ll ok = tp;
            while(1){
                if(fun(ok,t)<0)ok++;
                else break;
            }
            if(fun(ok,t)==0){
                fg = true;
                ans = mp(ok+t,ok);
                break;
            }
        }
        if(fun(tp2,t)<0){
            ll ok = tp2;
            while(1){
                if(fun(ok,t)<0)ok--;
                else break;
            }
            if(fun(ok,t)==0){
                fg = true;
                ans = mp(ok+t,ok);
                break;
            }
        }
    }
    if(fg){
        cout<<ans.first<<" "<<ans.second<<endl;
    }
    return 0;
}

Measured memory_bytes: 3656