#include <stdio.h>
int main() {
    int A, B;
    long long X;
    scanf("%lld", &X);
    //char *memo = malloc(sizeof(char) * ((long)sqrt(X) + 2));
    for (B = -120; B < 120; B++) {
        for (A = -120; A < 120; A++) {
            if (A == B) continue;
            int t = A > B ? A - B : B - A;
            if (X % t) continue;
            if ((A * A * A * A * A) - (B * B * B * B * B) == X) break;
        }
        if (A < 120) break;
    }
    printf("%d %d\n", A, B);
    return 0;
}