#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using std::cout; using std::cin; using std::string; using std::vector; int main() { vector powers; long long i = 1; while (i < 1e18) { powers.push_back(i); i *= 2; } long long n; cin >> n; bool ans = false; long long x, y; for (long long a = 1; a < n; a++) { long long b = n - a; bool is_power = false; for (int i = 0; i < powers.size(); i++) { if (a == powers[i] || b == powers[i]) { is_power = true; break; } } if (!is_power) { ans = true; x = a; y = b; break; } } if (ans) { cout << x << ' ' << y; } else { cout << -1; } }