#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
const long long int N = 200043;
const long long int MOD = 1000000007;
long long int add(long long int x, long long int y) {
  x = ((x % MOD) + (y % MOD)) % MOD;
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
  return x;
}
long long int mul(long long int x, long long int y) {
  return ((x % MOD) * (y % MOD)) % MOD;
}
long long int binpow(long long int x, long long int y) {
  long long int z = 1;
  while (y) {
    if (y & 1) z = mul(z, x);
    x = mul(x, x);
    y >>= 1;
  }
  return z;
}
long long int inv(long long int x) { return binpow(x, MOD - 2); }
long long int divide(long long int x, long long int y) {
  return mul(x, inv(y));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, i, j;
  t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int ar[n];
    long long int s = 0;
    for (i = 0; i < n; i++) cin >> ar[i], s = s ^ ar[i];
    vector<vector<long long int>> ans;
    if (n % 2 == 0 && s != 0) {
      cout << "NO" << endl;
      continue;
    }
    for (i = 0; i < n; i += 2) {
      if (i + 2 >= n) break;
      long long int x = ar[i] ^ ar[i + 1] ^ ar[i + 2];
      ar[i] = x;
      ar[i + 1] = x;
      ar[i + 2] = x;
      ans.push_back({i + 1, i + 2, i + 3});
    }
    long long int a;
    if (n % 2 == 0)
      a = n - 1;
    else
      a = n;
    for (i = a - 1; i >= 0; i -= 2) {
      if (i - 2 < 0) break;
      long long int x = ar[a - 1] ^ ar[i - 1] ^ ar[i - 2];
      ar[i - 1] = x;
      ar[i - 2] = x;
      ans.push_back({a, i, i - 1});
    }
    cout << "YES" << endl;
    cout << ans.size() << endl;
    for (auto x : ans) {
      for (auto y : x) cout << y << " ";
      cout << endl;
    }
    cout << endl;
  }
}
