#include <bits/stdc++.h>
using namespace std;
void qmax(int &x, int y) {
  if (x < y) x = y;
}
void qmin(int &x, int y) {
  if (x > y) x = y;
}
inline int read() {
  char s;
  int k = 0, base = 1;
  while ((s = getchar()) != '-' && s != EOF && !(isdigit(s)))
    ;
  if (s == EOF) exit(0);
  if (s == '-') base = -1, s = getchar();
  while (isdigit(s)) k = k * 10 + (s ^ '0'), s = getchar();
  return k * base;
}
inline void write(long long x) {
  static char cnt, num[20];
  cnt = 0;
  if (!x) {
    putchar('0');
    return;
  }
  for (; x; x /= 10) num[++cnt] = x % 10;
  for (; cnt; putchar(num[cnt--] + 48))
    ;
}
const int g[64][2][3] = {{{0, 0, 0}, {0, 0, 0}},    {{6, 5, 4}, {0, 0, 0}},
                         {{7, 5, 3}, {0, 0, 0}},    {{7, 6, 5}, {0, 0, 0}},
                         {{8, 5, 2}, {0, 0, 0}},    {{8, 6, 4}, {0, 0, 0}},
                         {{6, 5, 4}, {8, 7, 6}},    {{8, 7, 6}, {0, 0, 0}},
                         {{9, 5, 1}, {0, 0, 0}},    {{9, 6, 3}, {0, 0, 0}},
                         {{9, 7, 5}, {0, 0, 0}},    {{6, 5, 4}, {9, 7, 5}},
                         {{9, 8, 7}, {7, 5, 3}},    {{7, 6, 5}, {9, 8, 7}},
                         {{9, 8, 7}, {0, 0, 0}},    {{6, 5, 4}, {9, 8, 7}},
                         {{6, 5, 4}, {10, 6, 2}},   {{10, 6, 2}, {0, 0, 0}},
                         {{10, 7, 4}, {0, 0, 0}},   {{6, 5, 4}, {10, 7, 4}},
                         {{6, 5, 4}, {10, 8, 6}},   {{10, 8, 6}, {0, 0, 0}},
                         {{7, 6, 5}, {10, 8, 6}},   {{7, 5, 3}, {10, 8, 6}},
                         {{10, 9, 8}, {8, 5, 2}},   {{10, 9, 8}, {8, 6, 4}},
                         {{11, 10, 9}, {11, 7, 3}}, {{8, 7, 6}, {10, 9, 8}},
                         {{10, 9, 8}, {0, 0, 0}},   {{6, 5, 4}, {10, 9, 8}},
                         {{10, 9, 8}, {7, 5, 3}},   {{7, 6, 5}, {10, 9, 8}},
                         {{6, 5, 4}, {11, 6, 1}},   {{11, 6, 1}, {0, 0, 0}},
                         {{11, 7, 3}, {0, 0, 0}},   {{6, 5, 4}, {11, 7, 3}},
                         {{11, 8, 5}, {0, 0, 0}},   {{6, 5, 4}, {11, 8, 5}},
                         {{8, 7, 6}, {11, 6, 1}},   {{7, 6, 5}, {11, 8, 5}},
                         {{7, 5, 3}, {11, 9, 7}},   {{7, 6, 5}, {11, 9, 7}},
                         {{11, 9, 7}, {0, 0, 0}},   {{6, 5, 4}, {11, 9, 7}},
                         {{9, 8, 7}, {11, 7, 3}},   {{8, 7, 6}, {11, 9, 7}},
                         {{9, 7, 5}, {11, 8, 5}},   {{9, 8, 7}, {11, 6, 1}},
                         {{11, 10, 9}, {9, 5, 1}},  {{11, 10, 9}, {9, 6, 3}},
                         {{11, 10, 9}, {9, 7, 5}},  {{10, 7, 4}, {11, 6, 1}},
                         {{10, 8, 6}, {11, 6, 1}},  {{11, 8, 5}, {10, 6, 2}},
                         {{9, 8, 7}, {11, 10, 9}},  {{10, 8, 6}, {11, 7, 3}},
                         {{11, 10, 9}, {0, 0, 0}},  {{6, 5, 4}, {11, 10, 9}},
                         {{11, 10, 9}, {7, 5, 3}},  {{7, 6, 5}, {11, 10, 9}},
                         {{11, 10, 9}, {8, 5, 2}},  {{10, 9, 8}, {11, 6, 1}},
                         {{10, 9, 8}, {11, 7, 3}},  {{8, 7, 6}, {11, 10, 9}}};
const int maxm = 1 << 11;
const int maxn = 1e5 + 100;
int a[25], n, m, cnt, z[40], u[40];
int b[maxn], S, sum;
vector<int> G;
void insert(int x, int y, int z) {
  b[x] ^= 1, b[y] ^= 1, b[z] ^= 1;
  G.push_back(x);
  G.push_back(y);
  G.push_back(z);
}
void add(int x) {
  int len = 0;
  while (x) {
    z[++len] = x % 2;
    x /= 2;
  }
  for (int i = 1; i <= len; i++)
    if (z[i]) G.push_back(i);
}
bool flag;
void dfs(int x, int cnt, int now) {
  if (x == m + 1) {
    if (now == S) {
      int s = 0;
      for (int i = 1; i <= m; i++)
        if (u[i]) s++;
      if (s + sum > n / 3 + 12) {
        return;
      }
      for (int i = 1; i <= m; i++)
        if (u[i]) add(a[i]);
      flag = true;
      return;
    }
    return;
  }
  u[x] = 1;
  dfs(x + 1, cnt + 1, now ^ a[x]);
  u[x] = 0;
  if (flag) return;
  dfs(x + 1, cnt, now);
}
void work() {
  while (a[m] * 2 <= (1 << cnt)) {
    a[m + 1] = a[m] * 2;
    m++;
  }
}
int merge(int x, int y) {
  int sum = 0;
  for (int i = y; i >= x; i--) {
    sum = (sum << 1) | b[i];
  }
  return sum;
}
void work1() {
  m++;
  a[m] = 7;
  work();
  if (21 < (1 << cnt)) {
    m++;
    a[m] = 21;
    work();
  }
  if (73 < (1 << cnt)) {
    m++;
    a[m] = 73;
    work();
  }
  if (273 < (1 << cnt)) {
    m++;
    a[m] = 273;
    work();
  }
  flag = false;
  S = merge(1, cnt);
  sum = G.size() / 3;
  if (S)
    dfs(1, 0, 0);
  else
    flag = true;
  if (flag) {
    putchar('Y'), putchar('E'), putchar('S'), putchar('\n');
    S = G.size() / 3;
    printf("%d\n", S);
    for (int i = 0; i < S; i++) {
      printf("%d %d %d\n", G[i * 3], G[i * 3 + 1], G[i * 3 + 2]);
    }
  } else {
    putchar('N'), putchar('O'), putchar('\n');
  }
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) b[i] = read();
  cnt = n;
  int x;
  if (n < 8) {
    work1();
    return 0;
  }
  while (cnt > 10) {
    if (cnt - 6 < 8) {
      x = merge(cnt - 6 + 1, cnt);
      if (g[x][0][0] != 0)
        insert(cnt - 11 + g[x][0][0], cnt - 11 + g[x][0][1],
               cnt - 11 + g[x][0][2]);
      if (g[x][1][0] != 0)
        insert(cnt - 11 + g[x][1][0], cnt - 11 + g[x][1][1],
               cnt - 11 + g[x][1][2]);
      cnt = 8;
    } else {
      x = merge(cnt - 6 + 1, cnt);
      if (g[x][0][0] != 0)
        insert(cnt - 11 + g[x][0][0], cnt - 11 + g[x][0][1],
               cnt - 11 + g[x][0][2]);
      if (g[x][1][0] != 0)
        insert(cnt - 11 + g[x][1][0], cnt - 11 + g[x][1][1],
               cnt - 11 + g[x][1][2]);
      cnt -= 6;
    }
  }
  work1();
  return 0;
}
