
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


typedef struct
{
    int height;
    int connect;
    int* connctTarget;
}Info;



int main()
{
    int i, j, k, m;

    char str[1000];
    fgets(str, sizeof(str), stdin);
    int Num = atoi(str);

    int A = 0;
    int B = 0;

    int find = 0;
    for (B = -100;B < 100;B++)
    {
        int B5 = B * B * B * B * B;

        int hoge = Num + B5;

        for (A = -100;A < 100;A++)
        {
            int A5 = A * A * A * A * A;
            if (hoge == A5)
            {
                find = 1;
                break;
            }
        }
        if (find == 1) break;
    }

     printf("%d %d\n", A,B);


    return 0;
}