#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  long long int x = 0;
  for (long long int i = 0; i < n; i++) {
    long long int z;
    cin >> z;
    x ^= z;
  }
  if (n % 2 == 0) {
    if (x != 0) {
      cout << "NO";
      return 0;
    }
  }
  long long int w = n;
  if (n % 2 == 0) {
    w--;
  }
  cout << "YES\n";
  vector<vector<long long int> > moves;
  vector<long long int> m(3, 0);
  for (long long int i = 1; i + 2 <= w; i += 2) {
    m[0] = i;
    m[1] = i + 1;
    m[2] = i + 2;
    moves.push_back(m);
  }
  for (long long int i = w - 1; i >= 1; i -= 2) {
    m[0] = w;
    m[1] = i;
    m[2] = i - 1;
    moves.push_back(m);
  }
  cout << moves.size() << "\n";
  for (long long int i = 0; i < moves.size(); i++) {
    cout << moves[i][0] << " " << moves[i][1] << " " << moves[i][2] << "\n";
  }
}
