#include using namespace std; int BitCount(unsigned long long value) { int count = 0; unsigned long long mask = 1; for(int i = 0; i < 64; i++) { if(value & mask) count++; mask <<= 1; } return count; } bool isPowerOf2(unsigned long long value) { return (BitCount(value) == 1); } int main(void) { bool isSolved = false; unsigned long long n, a, b; cin >> n; for(unsigned long long i = 3; i <= (n / 2); i++) { a = i; b = n - i; if(!isPowerOf2(a) && !isPowerOf2(b)) { isSolved = true; break; } } if(isSolved) cout << a << " " << b << "\n"; else cout << "-1\n"; return 0; }