#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long bool notP2(llong val) { while(val > 1) { if(val % 2 == 1) return true; val /= 2; } return false; } int main() { llong n; cin >> n; if(n <= 5) { cout << -1 << "\n"; } else if(notP2(n-3)) { cout << 3 << " " << n-3 << "\n"; } else if(notP2(n-5)) { cout << 5 << " " << n-5 << "\n"; } else { cout << -1 << "\n"; } }