#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long int M = 1e9 + 7;
void solve();
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
  return 0;
}
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  long long int b = 0;
  for (long long int i = 0; i < (n); ++i) {
    cin >> a[i];
    b ^= a[i];
  }
  if (n & 1) {
    cout << "YES" << endl;
    cout << n - 2 << endl;
    for (long long int i = 1; i < n - 1; i += 2) {
      cout << i << " " << i + 1 << " " << i + 2 << endl;
    }
    for (long long int i = n - 2; i > 2; i -= 2) {
      cout << i << " " << i - 1 << " " << i - 2 << endl;
    }
  } else {
    if (b)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      cout << n - 3 << endl;
      for (long long int i = 1; i < n - 2; i += 2) {
        cout << i << " " << i + 1 << " " << i + 2 << endl;
      }
      for (long long int i = n - 3; i > 2; i -= 2) {
        cout << i << " " << i - 1 << " " << i - 2 << endl;
      }
    }
  }
}
