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

#define INDEX 1001

int main(void) {
  long long int x;
  scanf("%lld", &x);
  
  long long int num[INDEX];
  for (int i = 0; i < INDEX; i++) {
    num[i] = (long long int ) i * (long long int ) i * (long long int ) i * (long long int ) i * (long long int ) i; 
    // printf("%lld\n", num[i]);
  }

  int flag = 0;
  for (int i = 0; i < INDEX; i++) {
    for (int j = 0; j < INDEX; j++) {
      // printf("i, j: %d %d\n", i, j);
      if ((num[i] - num[j]) == x) {
        printf("%d %d\n", i, j);
        flag = 1;
        break;
      } else if ((num[i] + num[j]) == x) {
        printf("%d %d\n", i, (-1) * j);
        flag = 1;
        break;
      }
    }
    if (flag) break;
  }

  return 0;
}
