#include <stdio.h>
#include <math.h>

int main(){
    long int x;
    long int a, b;

    scanf("%ld", &x);
    int y = pow(x, 0.2);

    for(long int i = -y; i <= y; i++){
        for(long int j = -y; j <= y; j++)
            if(pow(i, 5) - pow(j, 5) == x){
                a = i; b = j;
                break;
            }
    }
    printf("%ld %ld", a, b);
}