#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long bool notP2(int val) { rep(i, 18) { if(1 << i == val) return false; } return true; } 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"; } }