#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[maxn];
queue<int> q;
queue<pair<int, int> > p;
void solve(int x) {
  cout << "YES" << '\n';
  cout << x - 1 << '\n';
  for (int i = (1); i <= (x); i++) q.push(i);
  while (q.size() > 1) {
    int b = q.front();
    q.pop();
    int c = q.front();
    q.pop();
    int d = q.front();
    q.pop();
    int tmp = b ^ c ^ d;
    a[b] = a[c] = a[d] = tmp;
    cout << b << ' ' << c << ' ' << d << '\n';
    p.push(make_pair(b, c));
    q.push(d);
  }
  int tmp = q.front();
  while (!p.empty()) {
    int b = p.front().first;
    int c = p.front().second;
    p.pop();
    cout << tmp << ' ' << b << ' ' << c << '\n';
  }
}
int main() {
  int n;
  cin >> n;
  int x = 0;
  for (int i = (1); i <= (n); i++) {
    cin >> a[i];
    x ^= a[i];
  }
  if (n & 1) {
    solve(n);
  } else {
    if (x)
      cout << "NO" << '\n';
    else {
      solve(n - 1);
    }
  }
  return 0;
}
