// Two Sets #include using namespace std; using ll = long long; int main() { ll n; cin >> n; if ((n * (n+1) / 2) & 1) { cout << "NO" << endl; return 0; } cout << "YES" << endl; ll target_sum = n * (n+1) / 4; vector first; vector second; for (ll i = n; i > 0; i--) { if (i <= target_sum) {first.push_back(i); target_sum -= i;} else second.push_back(i); } cout << first.size() << endl; for (auto e : first) cout << e << " "; cout << '\n' << second.size() << '\n'; for (auto e: second) cout << e << " "; cout << endl; return 0; }