#include <stdio.h>
#include <math.h>
int main(void)
{
    int64_t X;
    scanf("%lli", &X);
    if(X==1)
    {
        printf("0 -1\n");
        return 0;
    }
    for (int64_t A = 2;; A++)
    {
        if (X % A == 0)
        {
            // int64_t B=X/A;
            for (int64_t i = 0;;i++)
            {
                int64_t a1 = A-i;
                int64_t b1 = -i;
                if(pow(a1,5)-(pow(b1,5))==X)
                {
                    printf("%lli %lli\n",a1,b1);
                    return 0;
                }
                int64_t a2 = A+i;
                int64_t b2 = i;
                if(pow(a2,5)-(pow(b2,5))==X)
                {
                    printf("%lli %lli\n",a2,b2);
                    return 0;
                }
            }
            
        }
    }

    return 0;
}