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

int main(){
    long i,x,a=1,b=0,abstract=1000000000;
    scanf("%ld",&x);
    while (labs((long)pow(a, 5.0)-x)<abstract) {
        abstract=labs((long)pow(a, 5.0)-x);
        a++;
    }
    while (b==0) {
        for (i=1; i<=abstract; i++) {
            if (abstract==(long)pow(i, 5.0)) b=i;
        }
        a--;
    }
    if ((long)pow(a, 5.0)-x<0) b*=-1;
    printf("%ld %ld",a,b);
    return 0;
}



