#include <stdio.h>
#include <math.h>
int main(void){
  int a,b;
  int x;
  scanf("%d",&x);
  for(a=0;a<1000;a++){
    for(b=-1000;b<a;b++){
      if((pow((double)a,5)-pow((double)b,5))==(double)x){
	goto END;
      }
    }
  }
 END:
  printf("%d %d",a,b);
  return 0;
}
