#include<stdio.h>
 
int main(void){
  int x,a,b,i,j;
  int d[150];
  a,b = 0;
  scanf("%d", &x);
  d[0] = 0;
  for(i=1;i<150;i++){
    d[i] = i*i*i*i*i;
  }
  for(i=0;i<150;i++){
    for(j=0;j<150;j++){
      if(d[i] - d[j] == x){
        a = i;
        b = j;
        break;
      }else if(d[i] + d[j] == x){
        a = i;
        b = - j;
        break;
      }
    }
    if(a != 0 || b != 0)
      break;
  }
  printf("%d %d", a, b);
  return 0;
}