#include<stdio.h>
#include<math.h>
#define pow5(a,b) pow(a,5)-pow(b,5)

int checkNumRange(int upLim){
  int n = 0;
  while(pow5(n,n-1)<=upLim) n++;
  return n;
}

int main() {
  int x,upLim;
  scanf("%d", &x);
  upLim =checkNumRange(1000000000);
  for(int i = upLim; i > -upLim; i--){
    for(int j = upLim; j > -upLim; j--){
      if(pow5(i,j) == x) printf("%d %d\n",i,j);
    }
  }
}


