#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define ll long long int

ll x,a,b;

void keisan(){
    for(a=0;a<=151;a++){
    for(b=-200;b<=150;b++){
      ll tmpa,tmpb,sa;
      tmpa = a*a*a*a*a;
      tmpb = b*b*b*b*b;
      sa = tmpa-tmpb;
      
      if(sa==x){
	printf("%lld %lld\n",a,b);
	return ;}}
    }
    return;
}

int main(){
  scanf("%lld",&x);
  keisan();


  //printf("%lld %lld\n",a,b);
  
  return 0;
}
