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


int main() {
	int x;
	double a = 0, b = 1;
	scanf("%d", &x);
	while (pow5(a,b)!=x) {
      if (pow5(a, b) == x){}
      else if (abs(pow5(a, b) < x))b--;
      else { a++; b = 1; }
	}
  printf("%1.0lf %1.0lf",a,b);
}