/* -*- coding: utf-8 -*- * * 638.cc: No.638 Sum of "not power of 2" - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ inline bool is_pow2(ll k) { while ((k & 1) == 0) k >>= 1; return (k == 1); } /* main */ int main() { ll n; cin >> n; for (ll a = 3, b = n - a; a <= b; a++, b--) if (! is_pow2(a) && ! is_pow2(b)) { printf("%lld %lld\n", a, b); return 0; } puts("-1"); return 0; }