#include <bits/stdc++.h>
using namespace std;
void doit() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  long long x = 0;
  for (long long i = 0; i < n; i++) {
    x ^= v[i];
  }
  if ((n % 2) == 0 and x != 0) {
    cout << "NO"
         << "\n";
    return;
  }
  cout << "YES"
       << "\n";
  long long ans = ((n - 1) / 2) * 2 - 1;
  ans += (n % 2 == 0);
  cout << ans << "\n";
  bool ok = 0;
  if (n % 2 == 0) n--, ok = 1;
  for (long long i = 3; i <= n; i += 2) {
    cout << "1 " << i - 1 << ' ' << i << "\n";
  }
  for (long long i = n - 2; i >= 3; i -= 2) {
    cout << "1 " << i - 1 << ' ' << i << "\n";
  }
  if (ok) {
    cout << "1 " << n << ' ' << n + 1 << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    doit();
  }
}
