#include <stdio.h>

int main(){
    long int x;
    long int a, b;
    int end = 0;

    scanf("%ld", &x);

    for(long int i = 0; i < 65; i++){
        for(long int j = -65; j <= 0; j++){
            if(i*i*i*i*i - j*j*j*j*j == x){
                a = i; b = j;
                end = 1;
                break;
            }
        }
        if(end == 1) break;
    }
    printf("%ld %ld", a, b);
}