import std;

void calc(long x) {
    foreach (i; -200L..200L) {
        foreach (j; -200L..200L) {
            long y = i^^5 - j^^5;
            if (x == y) {
                writeln(i, " ", j);
                return;
            }
        }
    }
}

void main() {
    long x; scan(x);
    calc(x);
}

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T=string)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readints = reads!int;
