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

typedef long long ll;

int main(){
  long long x,t;
  long long a,b;
  int i,flag;
  long long y;
  double z;

  scanf("%lld", &x);

  a = 0;
  while(1){
    t = pow(a,5) - x;
    flag = 0;

    if(t < 0){
      t = -t;
      flag = 1;
    }

    y = (long long)pow(t,0.2);
    z = (double)pow(t,0.2);

    if((z - y) == 0.000){
      if(flag == 1) y = -y;
      printf("%lld %lld\n", a, y);
      break;
    }

    a++;
  }

  return 0;
}
