#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
int a[maxn];
struct node {
  int i, j, k;
};
vector<node> ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t, n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n - 2; i++) {
    while (a[i + 1] == a[i] && i + 1 <= n - 2) i++;
    a[i] = a[i + 1] = a[i + 2] = (a[i] ^ a[i + 1] ^ a[i + 2]);
    ans.push_back(node{i, i + 1, i + 2});
  }
  for (int i = n; i >= 3; i--) {
    while (a[i - 1] == a[i] && i - 1 >= 3) i--;
    a[i] = a[i - 1] = a[i - 2] = (a[i] ^ a[i - 1] ^ a[i - 2]);
    ans.push_back(node{i - 2, i - 1, i});
  }
  bool flag = true;
  for (int i = 2; i <= n; i++) {
    if (a[i] != a[i - 1]) {
      flag = false;
      break;
    }
  }
  if (!flag)
    cout << "NO" << '\n';
  else {
    cout << "YES" << '\n';
    cout << ans.size() << '\n';
    for (auto v : ans) {
      cout << v.i << " " << v.j << " " << v.k << '\n';
    }
  }
}
