#include <stdio.h>
int main()
{
  int X;
  int list[64];
  int i;
  int j;
  int temp;
  int flag = 0;
  for(i = 0, j = 1; i < 63; ++i, ++j){
    list[i] = j * j * j * j * j;
    //printf("%d, ", list[i]);
  }
  scanf("%d", &X);
  for(i = 0; i < 63; ++i){
    flag = 0;
    temp = X - list[i];
    if(temp < 0){
      temp *= -1;
      flag = 1;
    }
    else if(temp == 0){
      printf("%d %d\n", list[i], 0);
      return 0;
    }
    for(j = 0; j < 63; ++j){
      if((temp == list[j]) && (flag == 1)){
        printf("%d %d\n", (i+1), (j+1));
        return 0;
      }
      else if((temp == list[j]) && (flag == 0)){
        printf("%d %d\n", i+1, -(j+1));
        return 0;
      }
    }
  }
}