#include <stdio.h>
#include <string.h>
#define MIN(x, y) (((x) > (y)) ? (y) : (x))
#define ABS(x) ((x) >= 0 ? (x) : (-(x)))

int main()
{
  int x;
  scanf("%d", &x);
  /*
  long long pre = 0;
  for (int i = 0; i < 121; i++) {
    long long i_5 = (long long)i*i*i*i*i;
    printf("%d, %lld, %lld\n", i, i_5, i_5 - pre);
    pre = i_5;
    i_5[i] = (long long)i * i * i * i * i;
  }
  */
  
  for (int b = -120; b <= 120; b++) {
    //long long root =  - x
    for (int a = -120; a < 121; a++) {
      if ((long long)x == (long long)a * a * a * a * a - (long long) b * b * b * b * b ) {
        printf("%d %d", a, b);
        return 0;
      }
    }
  }
  return 0;
}