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

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

    for (int a=0; a<n; a++) {
        double a5 = pow(a,5);
        double b5 = a5-n;
        int b;
        if (b5>=0) b = pow(b5, 0.2);
        else       b = -pow(-b5, 0.2);
        int b52 = b*b*b*b*b;
        //printf("%g %d %d\n", a5, b52, b);
        if (a5-b52==n) {
            printf("%d %d\n", a, b);
            return 0;
        }
    }
}
