#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <float.h>
#include <stdlib.h>
#include <math.h>

int main(void)
{
	long int i, j, k;
	long int x;
	long int a, b;
	long int work;
	long int flg = 0;
	
	scanf("%ld", &x);
	
	a = b = 0;
	
	for(i = 0; i <= 2 * (long int)sqrt( (long int)sqrt(x) + 1 ) + 1; i++) {
		for(j = 0; j <= i; j++) {
			if(i * i * i * i * i - x == j * j * j * j * j) {
				a = i;
				b = j;
				flg = 1;
				break;
			}
			
			if(i * i * i * i * i - x == (-1) * j * j * j * j * j) {
				a = i;
				b = (-1) * j;
				flg = 1;
				break;
			}
		}
		if(flg != 0) {
			break;
		}
	}
	
	printf("%ld %ld\n", a, b);
	
	return 0;
}
