#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e5 + 4;
bool cmp(const pair<string, int> &a, const pair<string, int> &b) {
  if (a.second < b.second)
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  long long ar[n];
  long long x = 0;
  for (int i = 0; i < n; i++) cin >> ar[i], x ^= ar[i];
  if (n % 2 == 0 && x != 0)
    cout << "NO\n";
  else {
    cout << "YES\n";
    cout << (n - 1) / 2 + (n - 3) / 2 << "\n";
    int m = 1;
    while (m + 2 <= n) {
      cout << m << " " << m + 1 << " " << m + 2 << "\n";
      m += 2;
    }
    m = 1;
    while (m + 1 < n - 2) {
      cout << m << " " << m + 1 << " " << n << "\n";
      m += 2;
    }
  }
}
