#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define F(i,a,n) for(int i=a; i<n; i++)
#define INF 100000000000 // long only


int main(){
  long x;
  scanf("%ld",&x);
  int max=2000;
  long a[max],b[max];
  F(i,0,max){
    a[i]=i;
    b[i]=pow(i,5);
  }
  F(i,0,max){
    F(j,0,max){
      if(b[i]-b[j]==x){
        printf("%ld %ld\n",a[i],a[j]);
        return 0;
      }else if(b[i]+b[j]==x){
        printf("%ld %ld\n",a[i],-a[j]);
        return 0;
      }

    }
  }
  return 0;
}