//Normal #define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; void print(auto a){ cout << a; } void prints(auto a){ cout << a << " "; } void prints(){ cout << " "; } void printl(auto a){ cout << a << endl; } void printl(){ cout << endl; } void fix(int n){ cout << fixed << setprecision(n); } int siz(string s){ return (int)s.size(); } int main(){ ll N; cin >> N; map mp; ll i = 1; while(i < 1e18){ mp[i]++; i *= 2; } for(ll X = N-3; X > 0; X--){ ll Y = N-X; if(mp[X] == 0 and mp[Y] == 0){ if(X > Y) swap(X, Y); cout << X << " " << Y << endl; return 0; } } printl(-1); return 0; }