import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdlib;

immutable int INF = 1 << 29;

void main() {
    auto X = readln.chomp.to!long;

    long[] F;
    for (long i = 1; i * i <= X; ++i) {
        if (X % i == 0) {
            F ~= i;
            if (i * i != X) {
                F ~= X / i;
            }
        }
    }

    foreach (f; F) for (long a = f, b = 0; a^^5-b^^5 <= X; ++a, ++b) {
        if (a^^5 - b^^5 == X) {
            writeln(a, " ", b);
            return;
        }
    }

    foreach (f; F) for (long a = f-1, b = -1; a >= 0; --a, --b) {
        if (a^^5 - b^^5 == X) {
            writeln(a, " ", b);
            return;
        }
    }
}
