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

int main(void) {
  long long int x;
  long long int a,b;
  scanf("%lld", &x);
  //scanf("%d", &b):
  int m;
  int tmp;
  int flag=0;

  for(int i = 0;i<120;i++){
    a = i+1;
    tmp = a;
    a = a*a*a*a*a;
    b = a-x;
    if(b > 0){

      for(int j = 1;j<b/5;j++){
        int c = 0;
        c = b-(j*j*j*j*j);
        if(c == 0){
          m = j;
          flag =1;
          break;
        }
        }
        if(flag == 1){
          break;
      }
    }
    else{
    for(int k = -1;k > -120;k--){
      int d = 0;
      d = b-(k*k*k*k*k);
      if(d == 0){
        m = k;
        flag =1;
        break;
      }
    }
    if(flag == 1){
      break;
    }
  }

  }
  printf("%d %d\n",tmp,m);



  return 0;
}
