#include #include #include #define rep(i, a, n) for(int i = a;i < n;i++) using namespace std; int n; bool judge(int a){ return !((int)log2(a) == log2(a)); } int solve(){ rep(a, 1, (int)ceil(n/2.0)){ int b = n - a; if(judge(a) && judge(b)) return a; } return -1; } int main(){ cin >> n; int a = solve(); if(a != -1) cout << a << ' ' << n-a << endl; else cout << a << endl; return 0; }