description: You are given a sequence a of length n consisting of 0s and 1s.
  
  You can perform the following operation on this sequence: 
  
    * Pick an index i from 1 to n-2 (inclusive). 
    * Change all of a_{i}, a_{i+1}, a_{i+2} to a_{i} ⊕ a_{i+1} ⊕ a_{i+2} simultaneously, where ⊕ denotes the [bitwise XOR operation](https://en.wikipedia.org/wiki/Bitwise_operation#XOR)
  
  Find a sequence of at most n operations that changes all elements of a to 0s or report that it's impossible.
  
  We can prove that if there exists a sequence of operations of any length that changes all elements of a to 0s, then there is also such a sequence of length not greater than n.
  
  Input
  
  Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 10^4).
  
  The first line of each test case contains a single integer n (3 ≤ n ≤ 2⋅10^5) — the length of a.
  
  The second line of each test case contains n integers a_1, a_2, …, a_n (a_i = 0 or a_i = 1) — elements of a.
  
  It is guaranteed that the sum of n over all test cases does not exceed 2⋅10^5.
  
  Output
  
  For each test case, do the following: 
  
    * if there is no way of making all the elements of a equal to 0 after performing the above operation some number of times, print "NO". 
    * otherwise, in the first line print "YES", in the second line print k (0 ≤ k ≤ n) — the number of operations that you want to perform on a, and in the third line print a sequence b_1, b_2, ..., b_k (1 ≤ b_i ≤ n - 2) — the indices on which the operation should be applied. 
  
  
  
  If there are multiple solutions, you may print any.
  
  Example
  
  Input
  
  
  3
  3
  0 0 0
  5
  1 1 1 1 0
  4
  1 0 0 1
  
  
  Output
  
  
  YES
  0
  YES
  2
  3 1
  NO
  
  Note
  
  In the first example, the sequence contains only 0s so we don't need to change anything.
  
  In the second example, we can transform [1, 1, 1, 1, 0] to [1, 1, 0, 0, 0] and then to [0, 0, 0, 0, 0] by performing the operation on the third element of a and then on the first element of a.
  
  In the third example, no matter whether we first perform the operation on the first or on the second element of a we will get [1, 1, 1, 1], which cannot be transformed to [0, 0, 0, 0].
solution: #!/usr/bin/env python3
  import sys
  import getpass  # not available on codechef
  import math, random
  import functools, itertools, collections, heapq, bisect
  from collections import Counter, defaultdict, deque
  input = sys.stdin.readline  # to read input quickly
  
  # available on Google, AtCoder Python3, not available on Codeforces
  # import numpy as np
  # import scipy
  
  M9 = 10**9 + 7  # 998244353
  yes, no = "YES", "NO"
  # d4 = [(1,0),(0,1),(-1,0),(0,-1)]
  # d8 = [(1,0),(1,1),(0,1),(-1,1),(-1,0),(-1,-1),(0,-1),(1,-1)]
  # d6 = [(2,0),(1,1),(-1,1),(-2,0),(-1,-1),(1,-1)]  # hexagonal layout
  MAXINT = sys.maxsize
  
  # if testing locally, print to terminal with a different color
  OFFLINE_TEST = getpass.getuser() == "hkmac"
  # OFFLINE_TEST = False  # codechef does not allow getpass
  def log(*args):
      if OFFLINE_TEST:
          print('\033[36m', *args, '\033[0m', file=sys.stderr)
  
  def solve(*args):
      # screen input
      if OFFLINE_TEST:
          log("----- solving ------")
          log(*args)
          log("----- ------- ------")
      return solve_(*args)
  
  def read_matrix(rows):
      return [list(map(int,input().split())) for _ in range(rows)]
  
  def read_strings(rows):
      return [input().strip() for _ in range(rows)]
  
  def minus_one(arr):
      return [x-1 for x in arr]
  
  def minus_one_matrix(mrr):
      return [[x-1 for x in row] for row in mrr]
  
  # ---------------------------- template ends here ----------------------------
  
  
  def solve_(arr):
      # your solution here
  
      if sum(arr) == 0:
          return []
  
      if arr.count(0) == 0:
          return -1
  
      if sum(arr)%2 == 1:
          return -1
  
      left_ones = 0
      res = []
  
      for i in range(len(arr)):
          x = arr[i]
          log(i, x, left_ones)
          if x == 0:
              if left_ones == 0:
                  continue
  
              if left_ones%2 == 0:
                  j = i-2
                  while j >= 0 and arr[j] == 1:
                      assert arr[j] == 1
                      assert arr[j+1] == 1
                      assert arr[j+2] == 0
                      arr[j], arr[j+1], arr[j+2] = 0,0,0
                      res.append(j)
                      log(arr)
                      j -= 2
  
              else:
                  # delete 101
  
                  # cannot pair
                  if i + 1 == len(arr):
                      return -1
  
                  if arr[i+1] != 1:
                      if i > 0 and arr[i-1] == 1:
                          # make extension
                          assert arr[i-1] == 1
                          assert arr[i] == 0
                          assert arr[i+1] == 0
                          arr[i-1], arr[i], arr[i+1] = 1,1,1
                          log(arr)
                          res.append(i-1)
                          left_ones += 1
                          continue
  
                  assert arr[i-1] == 1
                  assert arr[i] == 0
                  assert arr[i+1] == 1
                  arr[i-1], arr[i], arr[i+1] = 0,0,0
                  log(arr)
                  res.append(i-1)
  
                  j = i-3
                  while j >= 0 and arr[j] == 1:
                      assert arr[j] == 1
                      assert arr[j+1] == 1
                      assert arr[j+2] == 0
                      arr[j], arr[j+1], arr[j+2] = 0,0,0
                      res.append(j)
                      log(arr)
                      j -= 2
  
              left_ones = 0
  
          else:
              left_ones += 1
  
      log(arr)
      sumarr = sum(arr)
  
      if sumarr == 0:
          return res
  
      if arr.count(0) == 0:
          return -1
  
      if sumarr%2 == 1:
          return -1
  
      assert arr[0] == 0
      for i in range(len(arr)):
          if arr[i] == 1:
              assert arr[i-1] == 0
              assert arr[i] == 1
              assert arr[i+1] == 1
              arr[i-1], arr[i], arr[i+1] = 0,0,0
              log(arr)
              res.append(i-1)
  
      assert sum(arr) == 0
  
      return res
  
  
  # for case_num in [0]:  # no loop over test case
  # for case_num in range(100):  # if the number of test cases is specified
  for case_num in range(int(input())):
  
      # read line as an integer
      k = int(input())
  
      # read line as a string
      # srr = input().strip()
  
      # read one line and parse each word as a string
      # lst = input().split()
  
      # read one line and parse each word as an integer
      # a,b,c = list(map(int,input().split()))
      lst = list(map(int,input().split()))
      # lst = minus_one(lst)
  
      # read multiple rows
      # arr = read_strings(k)  # and return as a list of str
      # mrr = read_matrix(k)  # and return as a list of list of int
      # mrr = minus_one_matrix(mrr)
  
      res = solve([x for x in lst])  # include input here
  
      assert (res == -1) == (solve(lst[::-1]) == -1)
  
      if res == -1:
          print("NO")
          continue
  
      print("YES")
      print(len(res))
      # print length if applicable
      # print(len(res))
  
      # parse result
      res = " ".join(str(x + 1) for x in res)
      # res = "\n".join(str(x) for x in res)
      # res = "\n".join(" ".join(str(x) for x in row) for row in res)
  
      # print result
      # print("Case #{}: {}".format(case_num+1, res))   # Google and Facebook - case number required
  
      print(res)
  