#include <bits/stdc++.h>
using namespace std;
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(long long &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head);
  R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const long long &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U>
void _W(const pair<T, U> &x) {
  _W(x.first);
  putchar(' ');
  _W(x.second);
}
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  W(tail...);
}
int MOD = 1e9 + 7;
void ADD(long long &x, long long v) {
  x = (x + v) % MOD;
  if (x < 0) x += MOD;
}
const int SIZE = 1e6 + 10;
int a[SIZE];
int n;
vector<int> an;
void big_one(int x) {
  if (x <= 6) {
    an.push_back(x);
    an.push_back(x + 3);
    an.push_back(x + 6);
    an.push_back(x + 3);
    an.push_back(x + 4);
    an.push_back(x + 5);
    an.push_back(x + 4);
    an.push_back(x + 5);
    an.push_back(x + 6);
  } else {
    an.push_back(x - 6);
    an.push_back(x - 3);
    an.push_back(x);
    an.push_back(x - 6);
    an.push_back(x - 5);
    an.push_back(x - 4);
    an.push_back(x - 5);
    an.push_back(x - 4);
    an.push_back(x - 3);
  }
}
void solve_big() {
  vector<int> ones;
  int r = n / 3 + 12;
  for (int j = 1; j + 2 <= n; j++) {
    for (int dd = (1); dd <= (1000); ++dd) {
      if (j - dd < 1 || j + dd > n) break;
      if (a[j] && a[j - dd] && a[j + dd]) {
        a[j - dd] = 0;
        a[j] = 0;
        a[j + dd] = 0;
        r--;
        an.push_back(j - dd);
        an.push_back(j);
        an.push_back(j + dd);
      }
    }
  }
  for (int i = (1); i <= (n); ++i) {
    if (a[i] == 1) ones.push_back(i);
  }
  set<int> H((ones).begin(), (ones).end());
  while (((int)(H).size())) {
    if (((int)(H).size()) * 3 <= r) {
      for (int x : H) {
        big_one(x);
      }
      break;
    } else {
      int x = *H.begin();
      int y = *next(H.begin());
      int z = y * 2 - x;
      if (z <= n) {
        an.push_back(x);
        an.push_back(y);
        an.push_back(z);
        r--;
        H.erase(x);
        H.erase(y);
        if (H.count(z)) {
          H.erase(z);
        } else
          H.insert(z);
      } else {
        z = n;
        if (n % 2 != x % 2) z--;
        y = (x + z) / 2;
        an.push_back(x);
        an.push_back(y);
        an.push_back(z);
        r--;
        H.erase(x);
        if (H.count(y)) {
          H.erase(y);
        } else
          H.insert(y);
        if (H.count(z)) {
          H.erase(z);
        } else
          H.insert(z);
      }
    }
  }
  W("YES");
  W(((int)(an).size()) / 3);
  for (int i = 0; i < ((int)(an).size()); i += 3) {
    W(an[i], an[i + 1], an[i + 2]);
  }
}
int gg[15][100], gg_r[15];
void solve_small() {
  vector<int> mask;
  int gn = 0;
  vector<int> ker[100];
  for (int dd = (1); dd <= (12); ++dd) {
    for (int j = 1; j + dd * 2 <= n; j++) {
      gg[j][gn] = 1;
      gg[j + dd][gn] = 1;
      gg[j + dd * 2][gn] = 1;
      ker[gn] = {j, j + dd, j + dd * 2};
      gn++;
    }
  }
  for (int i = (1); i <= (n); ++i) {
    if (a[i]) {
      gg_r[i] = 1;
    }
  }
  int st = 1;
  for (int i = 0; i < gn; i++) {
    int now = -1;
    for (int j = st; j <= n; j++) {
      if (gg[j][i]) {
        now = j;
        break;
      }
    }
    if (now == -1) continue;
    if (now != st) {
      for (int j = 0; j < (gn); ++j) swap(gg[now][j], gg[st][j]);
      swap(gg_r[now], gg_r[st]);
    }
    for (int j = (1); j <= (n); ++j) {
      if (j == st) continue;
      if (gg[j][i]) {
        for (int k = 0; k < (gn); ++k) gg[j][k] ^= gg[st][k];
        gg_r[j] ^= gg_r[st];
      }
    }
    st++;
  }
  for (int i = (st); i <= (n); ++i) {
    if (gg_r[i]) {
      W("NO");
      return;
    }
  }
  W("YES");
  for (int i = st - 1; i >= 1; i--) {
    if (!gg_r[i]) continue;
    for (int j = 0; j < gn; j++) {
      if (gg[i][j]) {
        for (int x : ker[j]) {
          an.push_back(x);
        }
        break;
      }
    }
  }
  W(((int)(an).size()) / 3);
  for (int i = 0; i < ((int)(an).size()); i += 3) {
    W(an[i], an[i + 1], an[i + 2]);
  }
}
int main() {
  R(n);
  for (int i = (1); i <= (n); ++i) R(a[i]);
  if (n <= 12) {
    solve_small();
  } else {
    solve_big();
  }
  return 0;
}

### Prompt

Please create a solution in cpp to the following 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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(long long &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head);
  R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const long long &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U>
void _W(const pair<T, U> &x) {
  _W(x.first);
  putchar(' ');
  _W(x.second);
}
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  W(tail...);
}
int MOD = 1e9 + 7;
void ADD(long long &x, long long v) {
  x = (x + v) % MOD;
  if (x < 0) x += MOD;
}
const int SIZE = 1e6 + 10;
int a[SIZE];
int n;
vector<int> an;
void big_one(int x) {
  if (x <= 6) {
    an.push_back(x);
    an.push_back(x + 3);
    an.push_back(x + 6);
    an.push_back(x + 3);
    an.push_back(x + 4);
    an.push_back(x + 5);
    an.push_back(x + 4);
    an.push_back(x + 5);
    an.push_back(x + 6);
  } else {
    an.push_back(x - 6);
    an.push_back(x - 3);
    an.push_back(x);
    an.push_back(x - 6);
    an.push_back(x - 5);
    an.push_back(x - 4);
    an.push_back(x - 5);
    an.push_back(x - 4);
    an.push_back(x - 3);
  }
}
void solve_big() {
  vector<int> ones;
  int r = n / 3 + 12;
  for (int j = 1; j + 2 <= n; j++) {
    for (int dd = (1); dd <= (1000); ++dd) {
      if (j - dd < 1 || j + dd > n) break;
      if (a[j] && a[j - dd] && a[j + dd]) {
        a[j - dd] = 0;
        a[j] = 0;
        a[j + dd] = 0;
        r--;
        an.push_back(j - dd);
        an.push_back(j);
        an.push_back(j + dd);
      }
    }
  }
  for (int i = (1); i <= (n); ++i) {
    if (a[i] == 1) ones.push_back(i);
  }
  set<int> H((ones).begin(), (ones).end());
  while (((int)(H).size())) {
    if (((int)(H).size()) * 3 <= r) {
      for (int x : H) {
        big_one(x);
      }
      break;
    } else {
      int x = *H.begin();
      int y = *next(H.begin());
      int z = y * 2 - x;
      if (z <= n) {
        an.push_back(x);
        an.push_back(y);
        an.push_back(z);
        r--;
        H.erase(x);
        H.erase(y);
        if (H.count(z)) {
          H.erase(z);
        } else
          H.insert(z);
      } else {
        z = n;
        if (n % 2 != x % 2) z--;
        y = (x + z) / 2;
        an.push_back(x);
        an.push_back(y);
        an.push_back(z);
        r--;
        H.erase(x);
        if (H.count(y)) {
          H.erase(y);
        } else
          H.insert(y);
        if (H.count(z)) {
          H.erase(z);
        } else
          H.insert(z);
      }
    }
  }
  W("YES");
  W(((int)(an).size()) / 3);
  for (int i = 0; i < ((int)(an).size()); i += 3) {
    W(an[i], an[i + 1], an[i + 2]);
  }
}
int gg[15][100], gg_r[15];
void solve_small() {
  vector<int> mask;
  int gn = 0;
  vector<int> ker[100];
  for (int dd = (1); dd <= (12); ++dd) {
    for (int j = 1; j + dd * 2 <= n; j++) {
      gg[j][gn] = 1;
      gg[j + dd][gn] = 1;
      gg[j + dd * 2][gn] = 1;
      ker[gn] = {j, j + dd, j + dd * 2};
      gn++;
    }
  }
  for (int i = (1); i <= (n); ++i) {
    if (a[i]) {
      gg_r[i] = 1;
    }
  }
  int st = 1;
  for (int i = 0; i < gn; i++) {
    int now = -1;
    for (int j = st; j <= n; j++) {
      if (gg[j][i]) {
        now = j;
        break;
      }
    }
    if (now == -1) continue;
    if (now != st) {
      for (int j = 0; j < (gn); ++j) swap(gg[now][j], gg[st][j]);
      swap(gg_r[now], gg_r[st]);
    }
    for (int j = (1); j <= (n); ++j) {
      if (j == st) continue;
      if (gg[j][i]) {
        for (int k = 0; k < (gn); ++k) gg[j][k] ^= gg[st][k];
        gg_r[j] ^= gg_r[st];
      }
    }
    st++;
  }
  for (int i = (st); i <= (n); ++i) {
    if (gg_r[i]) {
      W("NO");
      return;
    }
  }
  W("YES");
  for (int i = st - 1; i >= 1; i--) {
    if (!gg_r[i]) continue;
    for (int j = 0; j < gn; j++) {
      if (gg[i][j]) {
        for (int x : ker[j]) {
          an.push_back(x);
        }
        break;
      }
    }
  }
  W(((int)(an).size()) / 3);
  for (int i = 0; i < ((int)(an).size()); i += 3) {
    W(an[i], an[i + 1], an[i + 2]);
  }
}
int main() {
  R(n);
  for (int i = (1); i <= (n); ++i) R(a[i]);
  if (n <= 12) {
    solve_small();
  } else {
    solve_big();
  }
  return 0;
}

```