#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main() {
  int x;
  cin >> x;

  int a, b;
  for (a = 0;; ++a)
    for (b = -a; b < a; ++b)
      if (pow(a, 5) - pow(b, 5) == x)
        goto fin;

fin:
  cout << a << " " << b << endl;
}