#include <stdio.h>
#include <math.h>

int main(void) {
	long X;
	long A, B;
	long ta, tb;
	
	scanf("%ld", &X);
	
	for(A = 0; ; A++ ) {
		if( (ta = pow(A, 5)) == X ) {
			B = 0;
			break;
		}
		if( ta < X ) {
			for(B = -1; ; B-- ) {
				if( (tb = (ta - pow(B, 5))) == X) {
					break;
				}
				if( tb > X ) {
					B = 0;
					break;
				}
			}
		}
		else {
			for(B = 1; ; B++ ) {
				if( (tb = (ta - pow(B, 5))) == X) {
					break;
				}
				if( tb < X ) {
					B = 0;
					break;
				}
			}
		}
		
		if( B != 0 ) {
			break;
		}
	}
	
	printf("%ld %ld\n", A, B);
	
	return 0;
}
