#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;
	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) ); i++) {
		for(j = 0; j < i; j++) {
			a = j * j * j * j * j;
			work = sqrt(sqrt(a + x));
			if(work * work * work * work * work == a - x) {
				flg = 1;
				a = j;
				b = work;
			}
			if( (-1) * work * work * work * work * work == a - x) {
				a = j;
				b = work * (-1);
				flg = 2;
			}
			
			if(flg != 0) {
				break;
			}
		}
		if(flg != 0) {
			break;
		}
	}
	
	printf("%ld %ld\n", a, b);
	
	return 0;
}
