#include<stdio.h>
#include<math.h>

int main()
{
	long long X, a, b;

	scanf("%lld", &X);

	for (a = -100 ; a <= 100 ; a++)
	{
		for (b = -100 ; b <= 100 ; b++)
		{
			if (a*a*a*a*a - b*b*b*b*b == X)
			{
				printf("%lld %lld\n", a, b);
				goto out;
			}
		}
	}
out:
	return 0;
}
