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;
template <class n, class second>
ostream &operator<<(ostream &p, pair<n, second> x) {
  return p << "<" << x.first << ", " << x.second << ">";
}
template <class n>
auto operator<<(ostream &p, n y) ->
    typename enable_if<!is_same<n, string>::value,
                       decltype(y.begin(), p)>::type {
  int o = 0;
  p << "{";
  for (auto c : y) {
    if (o++) p << ", ";
    p << c;
  }
  return p << "}";
}
void dor() { cerr << endl; }
template <class n, class... second>
void dor(n p, second... y) {
  cerr << p << " ";
  dor(y...);
}
template <class n, class second>
void mini(n &p, second y) {
  if (p > y) p = y;
}
template <class n, class second>
void maxi(n &p, second y) {
  if (p < y) p = y;
}
const int M = 11;
pair<int, int> dp[M][1 << M];
int T[1024 * 256], n, nn;
queue<int> Q;
vector<vector<int>> R;
int getMask(int l, int ind) {
  int x = 0;
  for (int i = 0; i < l; i++) {
    x = (x * 2) + T[i + ind];
  }
  return x;
}
void add(int a, int b, int c) {
  T[a] = 1 - T[a];
  T[b] = 1 - T[b];
  T[c] = 1 - T[c];
  R.push_back(vector<int>{a + 1, b + 1, c + 1});
}
void add2(int l, int x, int off) {
  vector<int> V;
  for (int i = 0; i < M; i++) {
    if ((x >> i) % 2 == 1) {
      V.push_back(l - i + off);
    }
  }
  R.push_back(V);
}
void build(int l, int x, int off) {
  while (x != 0) {
    add2(l, dp[l][x].second, off);
    x ^= dp[l][x].second;
  }
}
int main() {
  for (int i = 3; i <= 10; i++) {
    int tmp = 0;
    for (int j = 0; j < (1 << M); j++) {
      dp[i][j] = make_pair(-1, -1);
      dp[i][0] = make_pair(0, 0);
    }
    while (!Q.empty()) {
      Q.pop();
    }
    Q.push(0);
    while (!Q.empty()) {
      int x = Q.front();
      Q.pop();
      for (int j = 0; j < i; j++) {
        for (int k = 1; j + 2 * k < i; k++) {
          int m = (1 << j) ^ (1 << (j + k)) ^ (1 << (j + 2 * k));
          int xx = x ^ m;
          if (dp[i][xx].first == -1) {
            dp[i][xx] = make_pair(dp[i][x].first + 1, m);
            tmp = max(tmp, dp[i][xx].first);
            Q.push(xx);
          }
        }
      }
    }
  }
  scanf("%d", &n);
  nn = n;
  int x = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", T + i);
    if (n < M) {
      x = (x * 2) + T[i];
    }
  }
  if (n < M) {
    if (dp[n][x].first == -1) {
      printf("NO\n");
      return 0;
    }
    build(n, x, 0);
  } else {
    int p = 0;
    while (n >= M) {
      if (T[p] == 0) {
        p++;
        n--;
        continue;
      }
      if (T[p + n - 1] == 0) {
        n--;
        continue;
      }
      if (T[p] == 1 && T[p + 1] == 1 && T[p + 2] == 1) {
        add(p, p + 1, p + 2);
        n -= 3;
        p += 3;
        continue;
      }
      if (T[p] == 1 && T[p + 1] == 0 && T[p + 2] == 0) {
        add(p, p + 3, p + 6);
        n -= 3;
        p += 3;
        continue;
      }
      if (T[p] == 1 && T[p + 2] == 1 && T[p + 1] == 0) {
        add(p, p + 2, p + 4);
        n -= 3;
        p += 3;
        continue;
      }
      if (T[p + n - 1] == 1 && T[p + n - 2] == 1 && T[p + n - 3] == 1) {
        add(p + n - 1, p + n - 2, p + n - 3);
        n -= 3;
        continue;
      }
      if (T[p + n - 1] == 1 && T[p + n - 2] == 0 && T[p + n - 3] == 0) {
        add(p + n - 1, p + n - 4, p + n - 7);
        n -= 3;
        continue;
      }
      if (T[p + n - 1] == 1 && T[p + n - 3] == 1 && T[p + n - 2] == 0) {
        add(p + n - 1, p + n - 3, p + n - 5);
        n -= 3;
        continue;
      }
      if ((p + p + n) % 2 == 1) {
        add(p, (p + p + n) / 2, p + n - 1);
        add(p + 1, (p + p + n) / 2, p + n - 2);
      } else {
        add(p, (p + p + n) / 2 - 1, p + n - 2);
        add(p + 1, (p + p + n) / 2, p + n - 1);
      }
      p += 3;
      n -= 6;
    }
    bool dasie = false;
    for (int i = 0; i < M; i++) {
      if (i > p) {
        continue;
      }
      if (-i + M - 1 < n) {
        continue;
      }
      if (p - i + M - 1 > nn) {
        continue;
      }
      int mask = getMask(M - 1, p - i);
      if (dp[M - 1][mask].first != -1) {
        dasie = true;
        build(M - 1, mask, p - i);
        break;
      }
    }
    if (!dasie) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n%d\n", (int)(R).size());
  for (auto x : R) {
    printf("%d %d %d\n", x[0], x[1], x[2]);
  }
  return 0;
}