#include <stdio.h>
#include <math.h>
#define int64 long long

int main()
{
  int64 xx, tmp;
  scanf("%lld", &xx);
  for(int64 ii = -120;ii <= 120;ii++)
  {
    for(int64 jj = -120;jj <= 120;jj++)
    {
      tmp = ii * ii * ii * ii * ii - jj * jj * jj * jj * jj;
      if(xx == tmp)
      {
        printf("%lld %lld\n", ii, jj);
        return 0;
      }
    }
  }
  return 0;
}