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

long long xx[100000];
int x;

int main( int argc, char *argv[] )
{
    int max;
    long long a, b;

    xx[0] = 0;
    for( int i=1; ; i++ ) {
        xx[i] = (long long) i*i*i*i*i;
        max = i;
//        printf( "%d %lld\n", i, xx[i] );
        if( xx[i] < xx[i-1] ) break;
    }

//printf( "max = %d\n", max );

    scanf( "%d", &x );

    for( int i=1; i<max; i++ ) {
        for( int j=0; j<i; j++ ) {
            if( xx[i] - xx[j] == x ) {
                printf( "%d %d\n", i, j );
                exit( 0 );
            }
        }
    }

    for( int i=1; i<max; i++ ) {
        for( int j=0; j<i; j++ ) {
            if( xx[i] + xx[j] == x ) {
                printf( "%d %d\n", i, -j );
                exit( 0 );
            }
        }
    }
}
