#include <stdio.h>
#include <math.h>
int main(void){
	int a,b,c;
  	scanf("%d",&c);
  	for(a=-10000;a<10000;a++){
      for(b=-10000;b<10000;b++){
        if((pow(a,5) - pow(b,5)) == c){
          printf("%d %d\n",a,b);
        }
      }
    }
  	return 0;
}