#include <math.h>

int main(void){
  long x;
  scanf("%ld",&x);
  
  for(long i = -118;i <= 119;i ++){
    for(long j = -118;j <= i;j ++){
      if(((long)pow(i,5) - pow(j,5)) == x){
        printf("%d  %d",i,j);
        return 0;
      }
    }
  }
  return 0;
}