#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

//ABC166D
int main(void) {
  long long a, b, x, n, k, i, cou=0, tmp;
  scanf(" %lld", &x);

  a=0, b=0;
  while(1){
    if(pow(a, 5)-pow(b, 5)==x) break;
    a++, b=a;
    while(pow(a, 5)-pow(b, 5)<=x){
      if(pow(a, 5)-pow(b, 5)==x) break;
      b--;
    }

  }
  printf("%lld %lld", a, b);
}