#include using namespace std; int main(){ long long N; cin >> N; set st; for (int i = 0; i < 62; i++){ st.insert(1LL << i); } for (int i = 3; i < N; i++){ if (st.count(i) == 0 and st.count(N - i) == 0){ cout << i << ' ' << N - i << endl; return 0; } } cout << -1 << endl; }