import std.stdio, std.conv, std.string, std.algorithm,
       std.math, std.array, std.container, std.typecons;

void main() {
  auto x = readln.chomp.to!long;
  DList!long pAB;
  for(long i=0; abs(i*i*i*i*i - (i-1)*(i-1)*(i-1)*(i-1)*(i-1)) <= x; i++) {
    pAB.insert(i);
    pAB.insert(-i);
  }
  foreach(i;pAB) foreach(j;pAB) {
    if(i*i*i*i*i - j*j*j*j*j == x) {
      writef("%d %d\n", i, j);
      return;
    }
  }
}
