#include <bits/stdc++.h>
using namespace std;
long long Min(long long a, long long b) { return (a < b) ? a : b; }
long long Max(long long a, long long b) { return (a < b) ? b : a; }
long long gcd(long long m, long long n) {
  if (n == 0) return m;
  return gcd(n, m % n);
}
long long lcm(long long m, long long n) { return m * n / gcd(m, n); }
const int maxn = (int)5e6 + 100;
void solve() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  long long x = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    x ^= v[i];
  }
  if (n & 1) {
    cout << "YES\n" << n - 2 << "\n";
    for (int i = 2; i < n; i += 2) {
      cout << "1 " << i << ' ' << i + 1 << '\n';
    }
    for (int i = 2; i < n - 2; i += 2) {
      cout << "1 " << i << ' ' << i + 1 << '\n';
    }
    return;
  } else if (x == 0) {
    n--;
    cout << "YES\n" << n - 2 << "\n";
    for (int i = 2; i < n; i += 2) {
      cout << "1 " << i << ' ' << i + 1 << '\n';
    }
    for (int i = 2; i < n - 2; i += 2) {
      cout << "1 " << i << ' ' << i + 1 << '\n';
    }
    return;
  } else {
    cout << "NO";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long tc = 1;
  while (tc--) solve();
  exit(0);
}
