#include <bits/stdc++.h>
using namespace std;
void op(int& a, int& b, int& c) {
  int temp = a ^ b ^ c;
  a = temp;
  b = temp;
  c = temp;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int N;
  cin >> N;
  if ((N & 1) == 0) {
    int x;
    cin >> x;
    N--;
    for (int i = 0; i < N; i++) {
      int e;
      cin >> e;
      x ^= e;
    }
    if (x) {
      cout << "NO\n";
      return 0;
    }
  } else
    cin.ignore(numeric_limits<streamsize>::max(), '\n');
  cout << "YES\n" << N - 2 << "\n";
  int numTimes = (N - 3) / 2;
  int cnt = 0;
  for (int i = 0; i <= numTimes; i++)
    cout << ++cnt << " " << ++cnt << " " << cnt + 1 << "\n";
  cnt = 0;
  for (int i = 0; i < numTimes; i++)
    cout << ++cnt << " " << ++cnt << " " << N << "\n";
  return 0;
}
