#include <stdio.h>

int pow5(int);

int pow5(int x)
{
    return x * x * x * x * x;
}

int main(int argc, const char **argv)
{
    int answer = 0, a = 0, b = 0;

    fscanf(stdin, "%d", &answer);

    while (1)
    {
        if ( pow5(a) - pow5(b) == answer ) break;
        if ( pow5(a) > answer + pow5(b) ) a--;
        if ( pow5(a) < answer + pow5(b) ) a++;
        if ( pow5(b) > pow5(a) - answer ) b--;
        if ( pow5(b) < pow5(a) - answer ) b++;
    }

    fprintf(stdout, "%d %d\n", a, b);
    return 0;
}