import std;
enum inf(T)()if(__traits(isArithmetic,T)){return T.max/4;}
T scan(T=long)(){return readln.chomp.to!T;}
void scan(T...)(ref T args){auto input=readln.chomp.split;foreach(i,t;T)args[i]=input[i].to!t;}T[] scanarr(T=long)(){return readln.chomp.split.to!(T[]);}
//END OF TEMPLATE

void main(){
    ulong x;
    scan(x);
    foreach(k;1..x+1){
        if(x%k==0){
            auto t=x/k;
            foreach(b;iota(-100,100)){
                auto a=t+b;
                if(x%(a^^4+a^^3*b+a^^2*b^^2+a*b^^3+b^^4)==0){
                    writefln("%s %s",a,b);
                    return;
                }
            }
        }
    }
}
