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;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int N = 100005;
bool c[(1 << 22)];
int d[(1 << 22)];
int p[(1 << 22)];
void solv0(int n) {
  vector<int> v;
  for (int x = 0; x < n; ++x) {
    for (int y = x + 1; y < n; ++y) {
      for (int z = y + 1; z < n; ++z) {
        if (y - x == z - y) {
          v.push_back(((1 << x) | (1 << y) | (1 << z)));
        }
      }
    }
  }
  for (int x = 0; x < (1 << n); ++x) c[x] = false;
  queue<int> q;
  c[0] = true;
  d[0] = 0;
  q.push(0);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = 0; i < ((int)(v).size()); ++i) {
      int h = (x ^ v[i]);
      if (!c[h]) {
        c[h] = true;
        d[h] = d[x] + 1;
        p[h] = v[i];
        q.push(h);
      }
    }
  }
  return;
  for (int x = 0; x < (1 << n); ++x) {
    if (!c[x]) {
      for (int i = 0; i < n; ++i) {
        if ((x & (1 << i)))
          cout << '1';
        else
          cout << '0';
      }
      cout << endl;
    }
  }
  int maxu = 0;
  for (int x = 0; x < (1 << n); ++x) {
    if (!c[x]) continue;
    maxu = max(maxu, d[x]);
  }
  cout << maxu << "\n";
  for (int x = 0; x < (1 << n); ++x) {
    if (!c[x]) continue;
    if (maxu == d[x]) {
      for (int i = 0; i < n; ++i) {
        if ((x & (1 << i)))
          cout << '1';
        else
          cout << '0';
      }
      cout << endl;
      cout << endl;
      while (x) {
        for (int i = 0; i < n; ++i) {
          if ((p[x] & (1 << i)))
            cout << '1';
          else
            cout << '0';
        }
        cout << endl;
        x ^= p[x];
      }
      return;
    }
  }
}
void solv6() {
  int n = 6;
  vector<int> v;
  for (int x = 0; x < n; ++x) {
    for (int y = x + 1; y < n; ++y) {
      for (int z = y + 1; z < n; ++z) {
        if (y - x == z - y) {
          v.push_back(((1 << x) | (1 << y) | (1 << z)));
        }
      }
      if (x - (y - x) < 0) v.push_back(((1 << x) | (1 << y)));
    }
    v.push_back((1 << x));
  }
  for (int x = 0; x < (1 << n); ++x) c[x] = false;
  queue<int> q;
  c[0] = true;
  d[0] = 0;
  q.push(0);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = 0; i < ((int)(v).size()); ++i) {
      int h = (x ^ v[i]);
      if (!c[h]) {
        c[h] = true;
        d[h] = d[x] + 1;
        p[h] = v[i];
        q.push(h);
      }
    }
  }
  return;
  for (int x = 0; x < (1 << n); ++x) {
    if (!c[x]) {
      for (int i = 0; i < n; ++i) {
        if ((x & (1 << i)))
          cout << '1';
        else
          cout << '0';
      }
      cout << endl;
    }
  }
  int maxu = 0;
  for (int x = 0; x < (1 << n); ++x) {
    if (!c[x]) continue;
    maxu = max(maxu, d[x]);
  }
  cout << maxu << "\n";
  for (int x = 0; x < (1 << n); ++x) {
    if (!c[x]) continue;
    if (maxu == d[x]) {
      for (int i = 0; i < n; ++i) {
        if ((x & (1 << i)))
          cout << '1';
        else
          cout << '0';
      }
      cout << endl;
      cout << endl;
      while (x) {
        for (int i = 0; i < n; ++i) {
          if ((p[x] & (1 << i)))
            cout << '1';
          else
            cout << '0';
        }
        cout << endl;
        x ^= p[x];
      }
      return;
    }
  }
}
int n;
int a[N];
vector<tuple<int, int, int> > ans;
void ubd(int x, int y, int z) {
  assert(x >= 1 && x <= n && y >= 1 && y <= n && z >= 1 && z <= n);
  assert(x < y && y < z && (y - x) == (z - y));
  ans.push_back(tie(x, y, z));
  a[x] ^= 1;
  a[y] ^= 1;
  a[z] ^= 1;
}
void solv() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  solv6();
  while (n >= 14) {
    int x = 0;
    for (int i = n - 5; i <= n; ++i) {
      x += (a[i] * (1 << (i - (n - 5))));
    }
    while (x) {
      vector<int> v;
      for (int i = 0; i < 6; ++i) {
        if ((p[x] & (1 << i))) v.push_back(n - 5 + i);
      }
      if (((int)(v).size()) == 3)
        ubd(v[0], v[1], v[2]);
      else if (((int)(v).size()) == 2)
        ubd(v[0] - (v[1] - v[0]), v[0], v[1]);
      else
        ubd(n - 6 - (v[0] - (n - 6)), n - 6, v[0]);
      x ^= p[x];
    }
    n -= 6;
  }
  solv0(n);
  int x = 0;
  for (int i = 1; i <= n; ++i) x += (a[i] * (1 << (i - 1)));
  if (!c[x]) {
    cout << "NO\n";
    return;
  }
  while (x) {
    vector<int> v;
    for (int i = 0; i < n; ++i) {
      if ((p[x] & (1 << i))) v.push_back(i + 1);
    }
    ubd(v[0], v[1], v[2]);
    x ^= p[x];
  }
  for (int i = 1; i <= n; ++i) assert(!a[i]);
  cout << "YES\n";
  cout << ((int)(ans).size()) << "\n";
  for (int i = 0; i < ((int)(ans).size()); ++i)
    cout << get<0>(ans[i]) << ' ' << get<1>(ans[i]) << ' ' << get<2>(ans[i])
         << "\n";
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int tt = 1;
  while (tt--) {
    solv();
  }
  return 0;
}