#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;

int main(void) {
  int scan; // scanf result
  ld n; // to input 
  ll a;
  ll b;

  scan = scanf("%Lf", &n);
  a = 0;
  while (1)
  {
    b = 0;
    while (b <= a)
    {
      if (pow((ld)a, 5) - pow((ld)b, 5) == n)
      {
        printf("%lld %lld", a, b);
        return (0);
      }
      if (pow((ld)a, 5) * (-1) - pow((ld)b, 5) == n)
      {
        printf("%lld %lld", a * (-1), b);
        return (0);
      }
      if (pow((ld)a, 5) - pow((ld)b, 5) * (-1) == n)
      {
        printf("%lld %lld", a, b * (-1));
        return (0);
      }
      if (pow((ld)a, 5) * (-1) - pow((ld)b, 5) * (-1) == n)
      {
        printf("%lld %lld", a * (-1), b * (-1));
        return (0);
      }
      b++;
    }
    a++;
  }
}
