#include "bits/stdc++.h"

using namespace std;



int main() {
	int X;
	cin >> X;
	for (int a = -118;a<=119;++a) {
		for (int b = -119; b <= 118;++b) {
			if (X == (pow(a,5)-pow(b,5))) {
				cout << a << " "<<b << endl;
				return 0;
			}
		}
	}
	return 0;
}