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

int main(void){

  long x;
  scanf("%ld", &x);
  long a,b;
  long a_minus_b_1;
  long a_minus_b_2;
  long left;
  for (long i = 1; i <= sqrt(x); i++) {
    if (x%i == 0) {
      a_minus_b_1 = i;
      a_minus_b_2 = x/i;
      for (long j = 0; ; j++) {
        a = j;
        b = a-a_minus_b_1;
        left = pow(a,5)-pow(b,5);
        if (pow(a,5)-pow(b,5) == x) {
          printf("%ld %ld\n", a, b);
          return 0;
        }
        if (b > 0 && pow(a,5)-pow(b,5) > x) {
          break;
        }
      }
      for (long j = 0; ; j++) {
        b = j;
        a = b+a_minus_b_2;
        if (pow(a,5)-pow(b,5) == x) {
          printf("%ld %ld\n", a, b);
          return 0;
        }
        if (b > 0 && pow(a,5)-pow(b,5) > x) {
          break;
        }
      }
    }
  }

  return 0;
}