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