import std;

long upper_bound(alias F)(size_t len) {
	long left = -1;
	long right = len;
	while (right - left > 1) {
		long mid = left + (right - left) / 2;
		bool succ = F(mid);
		if (succ) right = mid;
		else left = mid;
	}
	return right;
}

void main(){ 
	long x;
	scanf("%ld", &x);
	foreach(a;0..12) {
		long a5 = pow(a, 5);
		long bp = upper_bound!(idx => a5 - pow(idx, 5) <= x)(6200);
		if (a5 - pow(bp, 5) == x) {
			writefln("%d %d", a, bp);
			return;
		}
		long bm = upper_bound!(idx => a5 + pow(idx, 5) >= x)(6200);
		if (a5 + pow(bm, 5) == x) {
			writefln("%d %d", a, -bm);
			return;
		}
	}
}
