#include <bits/stdc++.h>

using namespace std;
using i64 = long long;
#define endl "\n"

int main() {
    i64 N;
    cin >> N;
    vector<i64> A(N);
    for (i64 i = 0; i < N; i++) {
        cin >> A[i];
    }
    N = min(N, 8LL);
    vector<i64> p(200, -1);
    for (i64 bit = 1; bit < (1LL << N); bit++) {
        i64 sum = 0;
        for (i64 i = 0; i < N; i++) {
            if (bit & (1 << i)) {
                (sum += A[i]) %= 200;
            }
        }
        if (p[sum] == -1) {
            p[sum] = bit;
        } else {
            cout << "Yes" << endl;
            i64 x = 0, y = 0;
            for (i64 i = 0; i < N; i++) {
                if (p[sum] & (1LL << i)) {
                    x++;
                }
                if (bit & (1LL << i)) {
                    y++;
                }
            }
            cout << x;
            for (i64 i = 0; i < N; i++) {
                if (p[sum] & (1LL << i)) {
                    cout << " " << i + 1;
                }
            }
            cout << endl << y;
            for (i64 i = 0; i < N; i++) {
                if (bit & (1LL << i)) {
                    cout << " " << i + 1;
                }
            }
            cout << endl;
            return 0;
        }
    }
    cout << "No" << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main(void){
  int n;
  cin>>n;
  vector<long long> A(n);
  for(int i=0;i<n;i++) cin>>A[i];

  long long ans = 10e17;
  for(int i=0;i<(1<<n);i++){
    long long xorv = 0;
    long long orv = 0;
    for(int j=0;j<=n;j++){
        if(j < n) orv = orv | A[j];
        if(((i>>j)&1) || j==n){
          xorv = xorv ^ orv;
          orv = 0;
        }
    }
    ans = min(ans, xorv);
  }


  cout << ans << endl;
}