#include using namespace std; typedef long long ll; map mp; int main(){ ll t = 1, n, ans = -1; mp[t] = 1; while(t*2 < 1e18){ t *= 2; mp[t] = 1; } scanf("%lld", &n); for(int i = 1;i < n;i++){ if(mp[i] == 0 && mp[n-i] == 0){ ans = i; break; } } printf("%lld %lld\n", ans, n-ans); return 0; }