Problem: You are given an array a of length n that consists of zeros and ones.

You can perform the following operation multiple times. The operation consists of two steps: 

  1. Choose three integers 1 ≤ x < y < z ≤ n, that form an arithmetic progression (y - x = z - y). 
  2. Flip the values a_x, a_y, a_z (i.e. change 1 to 0, change 0 to 1). 



Determine if it is possible to make all elements of the array equal to zero. If yes, print the operations that lead the the all-zero state. Your solution should not contain more than (⌊ n/3 ⌋ + 12) operations. Here ⌊ q ⌋ denotes the number q rounded down. We can show that it is possible to make all elements equal to zero in no more than this number of operations whenever it is possible to do so at all.

Input

The first line contains a single integer n (3 ≤ n ≤ 10^5) — the length of the array.

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ 1) — the elements of the array.

Output

Print "YES" (without quotes) if the answer exists, otherwise print "NO" (without quotes). You can print each letter in any case (upper or lower).

If there is an answer, in the second line print an integer m (0 ≤ m ≤ (⌊ n/3 ⌋ + 12)) — the number of operations in your answer.

After that in (i + 2)-th line print the i-th operations — the integers x_i, y_i, z_i. You can print them in arbitrary order.

Examples

Input

5
1 1 0 1 1


Output

YES
2
1 3 5
2 3 4


Input

3
0 1 0


Output

NO

Note

In the first sample the shown output corresponds to the following solution: 

  * 1 1 0 1 1 (initial state); 
  * 0 1 1 1 0 (the flipped positions are the first, the third and the fifth elements); 
  * 0 0 0 0 0 (the flipped positions are the second, the third and the fourth elements). 



Other answers are also possible. In this test the number of operations should not exceed ⌊ 5/3 ⌋ + 12 = 1 + 12 = 13.

In the second sample the only available operation is to flip all the elements. This way it is only possible to obtain the arrays 0 1 0 and 1 0 1, but it is impossible to make all elements equal to zero.

Solution (in CPP):

Solution:
#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;
}