#include<stdio.h>
int main(void)
{
  int X;
  long long A,B;
  while(scanf("%d",&X)!=0)
  {
    for(A=0;!0;A++)for(B=0;B<A;B++)
    {
      if(A*A*A*A*A-B*B*B*B*B==X)return printf("%lld %lld\n",A,B),0;
      else if(A*A*A*A*A+B*B*B*B*B==X)return printf("%lld %lld\n",A,-B),0;
    }
  }
}