#include using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; template using V = vector; template using VV = V>; template using VVV = V>; template using VVVV = VV>; #define rep(i,n) for(ll i=0ll;i void chmin(T& t, const U& u) { if (t > u) t = u; } template void chmax(T& t, const U& u) { if (t < u) t = u; } // cin.tie(nullptr); // ios::sync_with_stdio(false); // cout << fixed << setprecision(20); ll Rnd(ll L=0, ll R=mod99){ return rand()%(R-L)+L; } void solve(){ ll n; cin >> n; V v(n); rep(i,n) cin >> v[i]; VV pos(200100); rep(i, n) pos[v[i]].eb(i); rep(i, 200100) if(pos[i].size()>=2){ V ans(n); cout << "Yes" << endl; rep(i, n){ cout << i+1 << " "; ans[i] = i+1; } cout << endl; swap(ans[pos[i][0]],ans[pos[i][1]]); all(i,ans) cout << i << " "; cout << endl; return; } V>> vv(300000); V p(n); rep(i,n) p[i] = i+1; rep(i, 300){ ll x = 0; rep(j,n-1){ swap(p[j], p[Rnd(j,n)]); x ^= (v[j]+p[j]); } x ^= (v[n-1]+p[n-1]); vv[x].insert(p); if(vv[x].size()>1){ cout << "Yes" << endl; all(i, *(vv[x].begin())) cout << i << " "; cout << endl; all(i, *(vv[x].rbegin())) cout << i << " "; cout << endl; return; } } cout << "No" << endl; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int t=1; // cin >> t; rep(i,t) solve(); }