#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long

ll Mypow(ll a,ll b){
    ll i,ans=1;
    for (i=0; i<b; i++) ans*=a;
    return ans;
}

int main(){
    ll x,a=0,b=0;
    scanf("%lld",&x);
    for (a=-118; a<=119; a++) {
        for (b=-118; b<=119; b++) {
            if (x==(Mypow(a, 5)-Mypow(b, 5))) {
                printf("%lld %lld",a,b);
                return 0;
            }
        }
    }
    return 0;
}


