#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

uint32_t nextpint(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; }
void printint(uint32_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[10]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); }

int main(void){
	uint32_t x=nextpint();
	for(int32_t a=-119; a<=119; a++){
		int64_t p=(int64_t)a*a*a*a*a-(int64_t)(a+1)*(a+1)*(a+1)*(a+1)*(a+1);
		if(p==x){
			printf("%"PRId32" %"PRId32"\n", a, a+1);
			return 0;
		}
		if(-p==x){
			printf("%"PRId32" %"PRId32"\n", a+1, a);
			return 0;
		}
	}
	for(int32_t a=-100; a<=100; a++){
		for(int32_t b=-100; b<=100; b++){
			int64_t p=(int64_t)a*a*a*a*a-(int64_t)b*b*b*b*b;
			if(p==x){
				printf("%"PRId32" %"PRId32"\n", a, b);
				return 0;
			}
		}
	}
}
