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

int main(){
    long x,a=1,b=1,abstract=1000000000;
    scanf("%ld",&x);
    while (labs((long)pow(a, 5.0)-x)<abstract) {
        abstract=labs((long)pow(a, 5.0)-x);
        a++;
    }a--;
    while (abstract!=(long)pow(b, 5.0)) b++;
    if ((long)pow(a, 5.0)<x) b*=(-1);
    printf("%ld %ld",a,b);
    return 0;
}



