#include using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N; cin >> N; set s; s.insert(1); ll t = 2; while (t <= N) { s.insert(t); t *= 2; } for (int i = 3; i < N; i++) { if (s.count(i) == 0) { if (s.count(N - i) == 0) { cout << i << " " << N - i << "\n"; return 0; } } } cout << "-1" << "\n"; return 0; }