#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)<(y)?(y):(x))
#define MOD 1000000007LL
//#define MOD 998244353LL
//#define MOD 1000000009LL
const long long INF = 1LL << 60;
typedef long long ll;

int main(){
    ll X;
    scanf("%lld",&X);
    ll A, B;
    for(A = 0;A<10000;A++){
        for(B=A-1;B>(-10000);B--) if((A*A*A*A*A)-(B*B*B*B*B) == X) break;
        if((A*A*A*A*A)-(B*B*B*B*B) == X) break;
    }
    printf("%lld %lld\n",A,B);
    return 0;
}