#include <bits/stdc++.h>
using namespace std;
long long ans[100006][4];
long long tot = 0;
long long shu[100005];
void fun(long long a, long long b, long long c) {
  ans[++tot][0] = a;
  ans[tot][1] = b;
  ans[tot][2] = c;
}
int main(void) {
  int n;
  cin >> n;
  if (n % 2 == 0) {
    long long k = 0;
    long long i;
    for (i = 1; i <= n; i++) cin >> shu[i], k ^= shu[i];
    if (k != 0) {
      printf("NO\n");
      return 0;
    }
    for (i = 1; i + 2 <= n; i += 2) fun(i, i + 1, i + 2);
    for (i = 1; i + 2 <= n; i += 2) fun(i, i + 1, n);
    printf("YES\n%lld\n", tot);
    for (i = 1; i <= tot; i++) {
      printf("%lld %lld %lld\n", ans[i][0], ans[i][1], ans[i][2]);
    }
  } else {
    long long k = 0;
    long long i;
    for (i = 1; i <= n; i++) cin >> shu[i];
    for (i = 1; i + 2 <= n; i += 2) fun(i, i + 1, i + 2);
    for (i = 1; i + 2 <= n; i += 2) fun(i, i + 1, n);
    printf("YES\n%lld\n", tot);
    for (i = 1; i <= tot; i++) {
      printf("%lld %lld %lld\n", ans[i][0], ans[i][1], ans[i][2]);
    }
  }
}
