#include<stdio.h>
#include<math.h>
int main()
{
long int x,i,j,a,b,sw;
  scanf("%ld",&x);
  sw=0;
  a=-100;
  while(sw==0)
  {
  b=100;
   for(i=-b;i<b;++i)
   {if(pow(a,5)-pow(i,5)==x) {sw++;
                              b=i;
                             }
   }
    a++;
  }

  printf("%ld %ld",a,b);

return 0;}