#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define Rep(i,a,n)for(ll i=(ll)(a);i<(ll)(n);i++)
#define rep(i,n)Rep(i,0,n)
typedef long long ll;
typedef long double ld;
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))

int main() {
	ll x; scanf("%lld", &x);
	Rep(i, -121, 121) {
		Rep(j, -121, 121) {
			if (i * i * i * i * i - j * j * j * j * j - x == 0) {
				printf("%lld %lld", i, j); return 0;
			}
		}
	}
}