#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);
}

ll f_div(ll x)
{
	ll a = (ll)sqrt(x);
	ll b = (ll)sqrt(a);
	return (b);
}

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