Problem:
Score : 400 points

Problem Statement

Give a pair of integers (A, B) such that A^5-B^5 = X.
It is guaranteed that there exists such a pair for the given integer X.

Constraints

1 \leq X \leq 10^9

X is an integer.

There exists a pair of integers (A, B) satisfying the condition in Problem Statement.

Input

Input is given from Standard Input in the following format:

X

Output

Print A and B, with space in between.
If there are multiple pairs of integers (A, B) satisfying the condition, you may print any of them.

A B

Sample Input 1

33

Sample Output 1

2 -1

For A=2 and B=-1, A^5-B^5 = 33.

Sample Input 2

1

Sample Output 2

0 -1

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include<set>
#include<map>
#include<list>
#include<cmath>
#include<stack>
#include<queue>
#include<cstdio>
#include<cctype>
#include<string>
#include<vector>
#include<climits>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<algorithm>
#define endl '\n'
#define rtl rt<<1
#define rtr rt<<1|1
#define lson rt<<1, l, mid
#define rson rt<<1|1, mid+1, r
#define maxx(a, b) (a > b ? a : b)
#define minn(a, b) (a < b ? a : b)
#define zero(a) memset(a, 0, sizeof(a))
#define INF(a) memset(a, 0x3f, sizeof(a))
#define IOS ios::sync_with_stdio(false)
#define _test printf("============\n")
using namespace std;
typedef long long ll;
typedef pair<int, char> P;
typedef pair<ll, ll> P2;
const double pi = acos(-1.0);
const double eps = 1e-7;
const ll MOD =  1e9+7;
const int INF = 0x3f3f3f3f;
const int NIL = -1;
template<typename T> void read(T &x){
    x = 0;char ch = getchar();ll f = 1;
    while(!isdigit(ch)){if(ch == '-')f*=-1;ch=getchar();}
    while(isdigit(ch)){x = x*10+ch-48;ch=getchar();}x*=f;
}
const int maxn = 1e6+10;
inline ll f(ll x) {
    return x*x*x*x*x;
}
ll neg[maxn], nneg[maxn];
map<ll, int> v;
int main(){
    for (int i = 0; i<=1000; ++i) v[f(i)] = i;
    ll x; cin >> x;
    for (int i = 0; i<maxn; ++i) {
        if (v[f(i)]) {
            cout << 0 << ' ' << i << endl;
            return 0;
        }
        else if (v[x+f(i)]) {
            cout << v[x+f(i)] << ' ' << -i << endl;
            return 0;
        }
        else if (v[x-f(i)]) {
            cout << i << ' ' << v[x-f(i)] << endl;
            return 0;
        }
    }
    return 0;
}