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