#include <stdio.h>

int main(){
  long long x,y;
  scanf("%lld",&x);
  
  if(x==1){
    printf("0 -1");
  }
  if(x==2){
    printf("1 -1");
  }
  
  for(long long i=3;i>0;i++){
    if(x%i==0){y=i;break;}
  }
  
  for(long long i=y/2;i>0;i++){
    if(i*i*i*i-i*i*i*(y-i)+i*i*(y-i)*(y-i)-i*(y-i)*(y-i)*(y-i)+(y-i)*(y-i)*(y-i)*(y-i)==x/y){printf("%lld %lld",i,i-y);}
  }
}
