#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <tgmath.h>
#include <time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define miin(a, b, c) min((a), min((b), (c)))
#define maax(a, b, c) max((a), max((b), (c)))
#define mod 1000000007

ll i, j, x;

ll nyan(ll a){
    return a*a*a*a*a;
}

main(){
    scanf("%lld", &x);
    for(i=-200;i<=200;i++){
        for(j=-200;j<=200;j++){
            if(nyan(i) - nyan(j) == x){
                printf("%lld %lld\n",i,j);
                return 0;
            }
        }
    }
}