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

int main(void){
  long long x,a=0,b;
  scanf("%lld",&x);
  b=0;
     while(a==0){
    if (ceil((double) pow(x+pow(b,5),(double)1.0/5.0))==floor((double) pow(x+pow(b,5),(double)1.0/5.0))){
      a=(double) pow(x+pow(b,5),(double)1.0/5.0);
      break;
    }
    if(b==0){
      b++;
    }else if(b>0){
      b=b-2*fabs(b);
        }else{
      b=b+2*fabs(b)+1;
    }
    }
   printf("%lld %lld",a,b);

  return 0;
}