description: A bow adorned with nameless flowers that bears the earnest hopes of an equally nameless person.
  
  You have obtained the elegant bow known as the Windblume Ode. Inscribed in the weapon is an array of n (n ≥ 3) positive distinct integers (i.e. different, no duplicates are allowed).
  
  Find the largest subset (i.e. having the maximum number of elements) of this array such that its sum is a composite number. A positive integer x is called composite if there exists a positive integer y such that 1 < y < x and x is divisible by y.
  
  If there are multiple subsets with this largest size with the composite sum, you can output any of them. It can be proven that under the constraints of the problem such a non-empty subset always exists.
  
  Input
  
  Each test consists of multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 100). Description of the test cases follows.
  
  The first line of each test case contains an integer n (3 ≤ n ≤ 100) — the length of the array.
  
  The second line of each test case contains n distinct integers a_{1},a_{2},...,a_{n} (1 ≤ a_{i} ≤ 200) — the elements of the array.
  
  Output
  
  Each test case should have two lines of output.
  
  The first line should contain a single integer x: the size of the largest subset with composite sum. The next line should contain x space separated integers representing the indices of the subset of the initial array.
  
  Example
  
  Input
  
  
  4
  3
  8 1 2
  4
  6 9 4 2
  9
  1 2 3 4 5 6 7 8 9
  3
  200 199 198
  
  
  Output
  
  
  2
  2 1
  4
  2 1 4 3
  9
  6 9 1 2 3 4 5 7 8
  3
  1 2 3 
  
  Note
  
  In the first test case, the subset \\{a_2, a_1\} has a sum of 9, which is a composite number. The only subset of size 3 has a prime sum equal to 11. Note that you could also have selected the subset \\{a_1, a_3\} with sum 8 + 2 = 10, which is composite as it's divisible by 2.
  
  In the second test case, the sum of all elements equals to 21, which is a composite number. Here we simply take the whole array as our subset.
solution: #######################################################################################################
  #######        ###########         #######    #########    #######           ######               #####
  ######  ######  #########  ######  #######  ###########  #############   ################  ############
  ######  #######  ########  #######  ######  ###########  ##############  ################  ############
  ######  ######  #########  #######  ######               #############   ################  ############
  ######  ###   ###########  #######  ######  ###########  #############   ################  ############
  ######  #####  ##########  #######  ######  ###########  #############   ################  ############
  ######  ######  ##########  #####  #######  ###########  #############   ################  ############
  ####     ######     ######        ######    ########      #######            ##########     ###########
  #######################################################################################################
  import sys
  #-----------------------IMPORTANT  FUNCTIONS ---------------------------------#
  from math import cos, pi, ceil, pi, tan, floor, gcd, sqrt, log2, factorial, log10
  from collections import Counter
  from copy import deepcopy
  from string import ascii_lowercase, ascii_uppercase
  from statistics import mean, median, mode
  from bisect import *
  
  alpha = ascii_lowercase
  beta = ascii_uppercase
  
  
  #-----------------------NEXT POWER OF 2---------------------------------------#
  def nextPowerOf2(n):
      p = 1
      if (n and not (n & (n - 1))):
          return n
      while (p < n):
          p <<= 1
      return p
  
  
  #-----------------------GET DIVISORS 1 TO <=N   ------------------------------#
  def get_Divisors(n):
      arr = []
      i = 1
      while i <= sqrt(n):
          if (n % i == 0):
              if (n / i == i):
                  arr.append(i)
              else:
                  arr.append(i)
                  arr.append(n // i)
          i = i + 1
  
      return arr
  
  
  #----------------------CHECK    PRIMES-----------------------------------#
  def isprime(n):
      if n == 1:
          return 0
      i = 2
      while (i * i <= n):
          if (n % i == 0):
              return 0
          i += 1
      return 1
  
  
  #-----------------------PRE COMPUTED  PRIMES-----------------------------------#
  def Sieve(n):
      prime = [True for i in range(n + 1)]
      prime[0] = False
      prime[1] = False
      p = 2
      while (p * p <= n):
          if (prime[p] == True):
              for i in range(p * p, n + 1, p):
                  prime[i] = False
          p += 1
      return prime
  
  
  #-----------------------LARGER VALUE OF  X,Y,10**9+7 --------------------------#
  def power(x, y, p):
      res = 1
      x = x % p
      if (x == 0):
          return 0
      while (y > 0):
          if ((y & 1) == 1):
              res = (res * x) % p
          y = y >> 1
          x = (x * x) % p
      return res
  
  
  #-----------------------       CREATE MATRIX         --------------------------#
  def create_matrix(n, m):
      mat = [[] for i in range(n)]
      for i in range(n):
          for j in range(m):
              mat[i].append(0)
      return mat
  
  
  #By Default Counter stores the value in decending orderCounter({4: 2, 8: 2, 2: 1, 9: 1}
  #s=sorted(s.items(),key=lambda k:(k[0],k[1])) ---> [(2, 1), (4, 2), (8, 2), (9, 1)]
  #sort 2nd value  from bada se chhota  then(4,2)(8,2)->>(8,2)(4,2) s=sorted(s.items(),key=lambda k:(-k[1],-k[0]))  [(8, 2), (4, 2), (9, 1), (2, 1)]
  #for list pair in a list    s.sort(key=lambda k:(-k[1],-k[0])) [[3, 4], [8, 2], [4, 2]]
  # from functools import cmp_to_key
  #how to use compare ----ss = sorted(s, key=cmp_to_key(compare))
  #-----------------------*****CODE STARTS  HERE*****--------------------------#
  # sys.stdout = open('ot.txt', 'w')
  # sys.stdin = open('in.txt', 'r')
  
  def isComposite(n):
      if (n <= 1):
          return False
      if (n <= 3):
          return False
      if (n % 2 == 0 or n % 3 == 0):
          return True
      i = 5
      while(i * i <= n):
          if (n % i == 0 or n % (i + 2) == 0):
              return True
          i = i + 6
      return False
  # from queue import Queue
  # from random import *
  def main():
      for ttt in range(int(input())):
          n = int(input())
          arr=list(map(int,input().split()))
          aa=[[arr[i],i]for i in range(n)]
          sumo=sum(arr)
          if isComposite(sumo):
              print(n)
              for i in range(n):
                  print(i+1,end=" ")
              print()
              continue
          ff=0
          for i in range(n):
              if isComposite(sumo-arr[i]):
                  ff=1
                  print(n-1)
                  for j in range(n):
                      if i!=j:
                          print(j+1,end=" ")
                  print()
                  if ff:
                      break
              
                   
  if __name__ == "__main__":
      main()
  