#include using namespace std; int main() { int64_t n; cin >> n; constexpr auto bitcount = [](int64_t x) { int r = 0; for (; x; x >>= 1) { if (x & 1) { r++; } } return r; }; for (int64_t a = 3; a < 500; a++) { int64_t b = n - a; if (0 < b && 1 < bitcount(a) && 1 < bitcount(b)) { cout << a << ' ' << b << endl; return 0; } } cout << -1 << endl; return 0; }