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

int main(void){
  int x,i,j;

  if(scanf("%d",&x)==1){}

  for(i=-1000;i<1000;i++){
    for(j=-1000;j<1000;j++){
      if(pow((double)i,5.0)-pow((double)j,5.0)==(double)x){
	printf("%d %d\n",i,j);
        return 0;
      }
    }
  }
  
  return 0;
}
