#include <stdio.h>

int main()
{
	int x;
	int a = 0;
	int b = 0;
	int cnt = 0;
	int cmt = 0;
	scanf("%d", &x);
	
	while(a < x)
	{
		cnt = a+1;
	
		if(cnt*cnt*cnt*cnt*cnt >= x)
		{
			break;
		}
		else
		{
			a++;
		}
	}
	cnt = a*a*a*a*a;
	while(cnt+cmt != x)
	{
		cmt = b*b*b*b*b;
		
		if(cnt+cmt == x)break;
		else
		{
			b++;
		}
	}
		
	printf("%d %d", a, -b);
}