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

int main( int argc, char *argv[] ) {
    int n;
    scanf("%d", &n);

    int b=-pow(n, 0.5)-1;
    double b5=pow(b,5);
    for (int a=0; a<n; a++) {
        double a5 = pow(a,5);
        while (a5-b5>n) {
            b++;
            b5=pow(b,5);
        }
        if ((int)round(a5)-(int)round(b5)==n) {
            printf("%d %d\n", a, b);
            return 0;
        }
        //printf("%d-%d=%d\n", a, b, (int)(a5-b5));
    }
}
