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

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

	scanf("%d", &X);

	for (a = -64 ; a <= 64 ; a++)
	{
		for (b = -64 ; b <= 64 ; b++)
		{
			if (pow(a, 5) - pow(b, 5) == X)
			{
				printf("%d %d\n", a, b);
				goto out;
			}
		}
	}
out:
	return 0;
}