#include typedef long long ll; using namespace std; int INF = 1LL << 30; int MOD = 1e9+7; main(){ ll N; cin >> N; if(N <= 5 || N == 7){ cout << -1 << endl; return 0; } int cnt = __builtin_popcountll(N-3); if(cnt == 1){ cout << 5 << " " << N-5 << endl; }else{ cout << 3 << " " << N-3 << endl; } }