#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int a[MAXN];
struct Opt {
  int i, j, k;
};
vector<Opt> ans;
void solve() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (n & 1) {
    for (int i = 1; i <= n - 2; i += 2) {
      int t = a[i] ^ a[i + 1] ^ a[i + 2];
      a[i] = a[i + 1] = a[i + 2] = t;
      ans.push_back({i, i + 1, i + 2});
    }
    for (int i = 1; i <= n - 2; i += 2) {
      int t = a[i] ^ a[i + 1] ^ a[n];
      a[i] = a[i + 1] = a[n] = t;
      ans.push_back({i, i + 1, n});
    }
  } else {
    n--;
    for (int i = 1; i <= n - 2; i += 2) {
      int t = a[i] ^ a[i + 1] ^ a[i + 2];
      a[i] = a[i + 1] = a[i + 2] = t;
      ans.push_back({i, i + 1, i + 2});
    }
    for (int i = 1; i <= n - 2; i += 2) {
      int t = a[i] ^ a[i + 1] ^ a[n];
      a[i] = a[i + 1] = a[n] = t;
      ans.push_back({i, i + 1, n});
    }
    n++;
    if (a[n] != a[1]) {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
  cout << ans.size() << endl;
  for (auto c : ans) cout << c.i << " " << c.j << " " << c.k << endl;
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
