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

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

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