#include<stdio.h>

int main(void)
{
	long long int a, b, c;
	int k = 0;
	

	scanf("%lld", &c);

	for (a = 0; a < 100; a++) {
		for (b = -100; b < 100; b++) {
			if ((a * a * a * a * a - b * b * b * b * b) == c) {
				k = 1;
				break;
			}
		}

		if (k == 1) {
			printf("%lld %lld", a, b);
			break;
		}
	}


	return 0;
}