#include <bits/stdc++.h>
using namespace std;
int n;
int a[200200];
void solve() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int pref = 0;
  for (int i = 0; i < n; i++) {
    if (a[i])
      pref++;
    else
      break;
  }
  if (pref == n) {
    printf("NO\n");
    return;
  }
  vector<int> rj;
  if (pref % 2 == 1) {
    for (int i = pref - 1; i < n - 2; i += 1) {
      int xr = a[i] ^ a[i + 1] ^ a[i + 2];
      int sm = a[i] + a[i + 1] + a[i + 2];
      if (xr == 0) {
        rj.push_back(i + 1);
        a[i] = 0;
        a[i + 1] = 0;
        a[i + 2] = 0;
        pref -= 1;
        break;
      } else {
        if (sm == 1) {
          rj.push_back(i + 1);
          a[i + 1] = 1;
          a[i + 2] = 1;
          i += 1;
          pref += 2;
        } else if (sm == 3) {
          i += 1;
          pref += 2;
        }
      }
    }
  }
  if (pref >= n) {
    printf("NO\n");
    return;
  }
  if (pref % 2 == 1) {
    printf("NO\n");
    return;
  }
  for (int i = pref - 1; i >= 1; i -= 2) {
    rj.push_back(i);
  }
  for (int i = 0; i < pref; i++) a[i] = 0;
  for (int i = pref; i < n - 2; i++) {
    int xr = a[i] ^ a[i + 1] ^ a[i + 2];
    int sm = a[i] + a[i + 1] + a[i + 2];
    if (sm == 0) continue;
    if (a[i]) {
      if (xr == 1) {
        rj.push_back(i + 1);
        rj.push_back(i);
        a[i] = 0;
        i++;
        a[i + 1] = 1;
        a[i] = 0;
        i--;
      } else {
        rj.push_back(i + 1);
        a[i] = 0;
        a[i + 1] = 0;
        a[i + 2] = 0;
      }
    } else {
      if (xr == 0) {
        rj.push_back(i + 1);
        a[i] = 0;
        a[i + 1] = 0;
        a[i + 2] = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i]) {
      printf("NO\n");
      return;
    }
  }
  printf("YES\n%d\n", rj.size());
  for (int i : rj) {
    printf("%d ", i);
  }
  printf("\n");
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
