#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){ if(!a) return true; return !(log2(a) - (int)log2(a) < 0.0000000001); } long long int solve(){ rep(a, 0, n){ 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; }