#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
typedef long long ll;

ll sqr(ll a)
{
	return (a * a * a * a * a);
}

int main()
{
	ll x;
	scanf("%lld", &x);
	ll a = 0,b ;
	while (a <= (ll)sqrt(x))
	{
		b = -1 * a;
		while (b < a)
		{
			if (sqr(a) - sqr(b) == x)
			{
				printf("%lld %lld", a,b);
				return 0;
			}
			b++;
		}
		a++;
	}
	return (0);
}

