#include <inttypes.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
    intmax_t X;
    intmax_t A = 0, B = 0, factor = 2;

    scanf("%jd", &X);

    if (X == 1) {
        puts("0 -1");
        return 0;
    }

    while (1) {
        while (X % factor)
            factor++;

        for (size_t i = 0; i < (int)100; i++) {
            A = i + factor;
            B = i;
            if (A * A * A * A * A - B * B * B * B * B == X) {
                printf("%jd %jd\n", A, B);
                return 0;
            }

            A = -i + factor;
            B = -i;
            if (A * A * A * A * A - B * B * B * B * B == X) {
                printf("%jd %jd\n", A, B);
                return 0;
            }
        }

        for (size_t i = 0; i < (int)100; i++) {
            A = i + (X / factor);
            B = i;
            if (A * A * A * A * A - B * B * B * B * B == X) {
                printf("%jd %jd\n", A, B);
                return 0;
            }

            A = -i + (X / factor);
            B = -i;
            if (A * A * A * A * A - B * B * B * B * B == X) {
                printf("%jd %jd\n", A, B);
                return 0;
            }
        }

        factor++;
    }

    return 0;
}
