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;
const int INF = 1e9;
const long long INFLL = 1e18 + 1;
const int MAX = 200001;
const long long MOD = 1000000007;
long long inq(long long k, long long q) {
  if (q == 0) return 1;
  long long l = inq(k, q / 2);
  if (q % 2 == 0)
    return l * l % MOD;
  else
    return (l * l) % MOD * k % MOD;
}
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long cubr(long long a) {
  long long l = -1, r = 1e6 + 2;
  while (l < r - 1) {
    long long mid = (l + r) / 2;
    if (mid * mid * mid > a)
      r = mid;
    else
      l = mid;
  }
  return l;
}
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long possible(long long q) {
  if (q == INF) return -1;
  return q;
}
bool correct(int x, int xx) {
  if (x < 0) return 0;
  if (x >= xx) return 0;
  return 1;
}
long long dsumm(long long x, long long k) {
  long long y = 1;
  long long z = 0;
  for (int i = 0; y < 1e18; i++) {
    z += x / y % k;
    y *= k;
  }
  return z;
}
long long dcount(long long x) {
  long long y = 1;
  long long z = 0;
  int c[100];
  for (int i = 0; i < 10; i++) c[i] = 0;
  for (int i = 0; x > 0; i++) {
    if (c[x / y % 10] == 0) z++;
    c[x / y % 10] = 1;
    x /= 10;
  }
  return z;
}
long long lg10(long long x) {
  if (x == 0) return 0;
  return lg10(x / 10) + 1;
}
long long n, m, k;
struct three {
  int x, y, z;
};
long long t[200000];
vector<int> res(11);
vector<three> p;
vector<three> sollutions[2048];
void upd(int a, int b, int c, int x) {
  if (a >= x || b >= x || c >= x) return;
  res[a] ^= 1;
  res[b] ^= 1;
  res[c] ^= 1;
  p.push_back({a, b, c});
  return;
}
void perebor(int x) {
  for (int i = 0; i < (1 << 10); i++) sollutions[i].resize(0);
  for (int i = 0; i < (1 << 20); i++) {
    for (int j = 0; j < x; j++) res[j] = 0;
    p.resize(0);
    if ((i & (1 << 0))) upd(0, 1, 2, x);
    if ((i & (1 << 1))) upd(1, 2, 3, x);
    if ((i & (1 << 2))) upd(2, 3, 4, x);
    if ((i & (1 << 3))) upd(3, 4, 5, x);
    if ((i & (1 << 4))) upd(4, 5, 6, x);
    if ((i & (1 << 5))) upd(5, 6, 7, x);
    if ((i & (1 << 6))) upd(6, 7, 8, x);
    if ((i & (1 << 7))) upd(7, 8, 9, x);
    if ((i & (1 << 8))) upd(0, 2, 4, x);
    if ((i & (1 << 9))) upd(1, 3, 5, x);
    if ((i & (1 << 10))) upd(2, 4, 6, x);
    if ((i & (1 << 11))) upd(3, 5, 7, x);
    if ((i & (1 << 12))) upd(4, 6, 8, x);
    if ((i & (1 << 13))) upd(5, 7, 9, x);
    if ((i & (1 << 14))) upd(0, 3, 6, x);
    if ((i & (1 << 15))) upd(1, 4, 7, x);
    if ((i & (1 << 16))) upd(2, 5, 8, x);
    if ((i & (1 << 17))) upd(3, 6, 9, x);
    if ((i & (1 << 18))) upd(0, 4, 8, x);
    if ((i & (1 << 19))) upd(1, 5, 9, x);
    long long gen = 0;
    for (int j = 0; j < x; j++) gen = gen * 2 + res[j];
    if (p.size() < sollutions[gen].size() || sollutions[gen].size() == 0)
      sollutions[gen] = p;
  }
}
vector<int> ruines(11);
vector<three> ans;
vector<three> pre_ans;
void upd(int a, int b, int c) {
  ruines[a] ^= 1;
  ruines[b] ^= 1;
  ruines[c] ^= 1;
  pre_ans.push_back({a, b, c});
}
void sauce(int i) {
  if (i == 1) upd(8, 9, 10);
  if (i == 2) upd(7, 8, 9);
  if (i == 3) upd(6, 7, 8);
  if (i == 4) upd(5, 6, 7);
  if (i == 5) upd(4, 5, 6);
  if (i == 6) upd(3, 4, 5);
  if (i == 7) upd(6, 8, 10);
  if (i == 8) upd(5, 7, 9);
  if (i == 9) upd(4, 6, 8);
  if (i == 10) upd(3, 5, 7);
  if (i == 11) upd(2, 4, 6);
  if (i == 12) upd(1, 3, 5);
  if (i == 13) upd(4, 7, 10);
  if (i == 14) upd(3, 6, 9);
  if (i == 15) upd(2, 5, 8);
  if (i == 16) upd(1, 4, 7);
  if (i == 17) upd(0, 3, 6);
  if (i == 18) upd(2, 6, 10);
  if (i == 19) upd(1, 5, 9);
  if (i == 20) upd(0, 4, 8);
  if (i == 21) upd(0, 5, 10);
}
void another(int pos) {
  for (int i = 0; i < 22; i++) {
    for (int j = 0; j < 22; j++) {
      for (int i2 = 0; i2 < 11; i2++) ruines[i2] = 0;
      pre_ans.resize(0);
      sauce(i);
      sauce(j);
      if (t[pos] == ruines[5] && t[pos + 1] == ruines[6] &&
          t[pos + 2] == ruines[7] && t[pos + 3] == ruines[8] &&
          t[pos + 4] == ruines[9] && t[pos + 5] == ruines[10]) {
        t[pos - 1] ^= ruines[4];
        t[pos - 2] ^= ruines[3];
        t[pos - 3] ^= ruines[2];
        t[pos - 4] ^= ruines[1];
        t[pos - 5] ^= ruines[0];
        t[pos + 1] ^= ruines[6];
        t[pos + 2] ^= ruines[7];
        t[pos + 3] ^= ruines[8];
        t[pos + 4] ^= ruines[9];
        t[pos + 5] ^= ruines[10];
        t[pos] ^= ruines[5];
        for (int i2 = 0; i2 < pre_ans.size(); i2++) {
          three F = pre_ans[i2];
          F.x += pos - 4;
          F.y += pos - 4;
          F.z += pos - 4;
          ans.push_back(F);
        }
        return;
      }
    }
  }
}
int main() {
  cin >> n;
  k = n;
  for (int(i) = 0; (i) != (n); i++) cin >> t[i];
  if (n <= 10) {
    perebor(n);
    long long gen = 0;
    for (int i = 0; i < n; i++) gen = gen * 2 + t[i];
    if (gen != 0 && sollutions[gen].size() == 0) {
      cout << "NO";
      return 0;
    } else {
      cout << "YES\n";
      cout << sollutions[gen].size() << endl;
      for (int i = 0; i < sollutions[gen].size(); i++) {
        cout << 1 + sollutions[gen][i].x << " " << 1 + sollutions[gen][i].y
             << " " << 1 + sollutions[gen][i].z << "\n";
      }
      return 0;
    }
  }
  k = n - 6;
  while (k >= 5) {
    another(k);
    k -= 6;
  }
  perebor(10);
  long long gen = 0;
  for (int i = 0; i < 10; i++) gen = gen * 2 + t[i];
  for (int i = 0; i < sollutions[gen].size(); i++) {
    three F = sollutions[gen][i];
    F.x++;
    F.y++;
    F.z++;
    ans.push_back(F);
  }
  cout << "YES\n";
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].x << " " << ans[i].y << " " << ans[i].z << "\n";
  }
}