#include #include using namespace std; constexpr uint16_t pop_count(uint64_t a) noexcept { uint16_t ans = UINT16_C(0); for (; a != UINT64_C(0); a >>= UINT64_C(1)) if (a & UINT64_C(1)) ++ans; return ans; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint64_t N, i; cin >> N; for (i = 1; i != N; ++i) if (pop_count(i) != 1 && pop_count(N - i) != 1) { cout << i << ' ' << N - i << '\n'; return 0; } cout << "-1\n"; return 0; }