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 java.util.*;
  import java.lang.*;
  import java.io.*;
  import java.text.DecimalFormat;
  
  public final class Solution {
  
      static int inf = Integer.MAX_VALUE;
      static long mod = 1000000000 + 7;
     
  
   static boolean isPrime(int no){
      for(int i=2;i*i<=no;i++){
         if(no%i==0){
             return false;
         }
      }
      return true;
   }  
  
   static void ne(Reader sc, BufferedWriter op) throws Exception {
        int n=sc.nextInt();
        int[] arr= new int[n];
        int sum=0;
        for(int i=0;i<n;i++){
            arr[i]=sc.nextInt();
         sum+=arr[i];
  
        }
       if(isPrime(sum)){
           int id=-1;
           for(int i=0;i<n;i++){
               if(arr[i]%2!=0){
                   id=i;
                   break;
               }
           }
           op.write((n-1)+"\n");
           for(int i=1;i<=n;i++){
               if(i!=id+1){
                   op.write(i+" ");
               }
           }
       }else{
        op.write((n)+"\n");
        for(int i=1;i<=n;i++){
            op.write(i+" ");
        }
  
  
       }
       op.write("\n");
  
  
        
          
    }
  
    
  
  
  
  
      static long gcd(long a, long b){
          if(a==0) return b;
          return gcd(b%a,a);
      }
      // static int lcm(int a, int b){
      //     return (a*b)/gcd(a,b);
      // }
  
      public static void main(String[] args) throws Exception {
          BufferedWriter op = new BufferedWriter(new OutputStreamWriter(System.out));
          Reader sc = new Reader();
         
          int t = sc.nextInt();
          while (t-->0){ne(sc, op);}
          
          // ne(sc,op);
             
                     
          op.flush();
      }
  
      static void print(Object o) {
          System.out.println(String.valueOf(o));
      }
      static int[] toIntArr(String s){
          int[] val= new int[s.length()];
          for(int i=0;i<s.length();i++){
              val[i]=s.charAt(i)-'a';
          }
          return val;
      }
      static void  sort(int[] arr){
          ArrayList<Integer> list= new ArrayList<>();
          for(int i=0;i<arr.length;i++){
              list.add(arr[i]);
  
          }
          Collections.sort(list);
          for(int i=0;i<arr.length;i++){
              arr[i]=list.get(i);
          }
      }
         static void  sort(long[] arr){
          ArrayList<Long> list= new ArrayList<>();
          for(int i=0;i<arr.length;i++){
              list.add(arr[i]);
  
          }
          Collections.sort(list);
          for(int i=0;i<arr.length;i++){
              arr[i]=list.get(i);
          }
      }
  
  }
  
  // return -1 to put no ahed in array
  class pair {
      int xx;
  
      int yy;
  
  
      pair(int xx, int yy ) {
          this.xx = xx;
          this.yy = yy;
      }
  }
  
  
  class sortY implements Comparator<pair> {
      public int compare(pair p1, pair p2) {
          if (p1.yy > p2.yy) {
              return -1;
          } else if (p1.yy == p2.yy) {
              if (p1.xx > p2.xx) {
                  return 1;
              } else if (p1.xx < p2.xx) {
                  return -1;
              }
              return 0;
  
          }
          return 1;
      }
  }
  
  class sortX implements Comparator<pair> {
      public int compare(pair p1, pair p2) {
          if (p1.xx > p2.xx) {
              return 1;
          } else if (p1.xx == p2.xx) {
              if (p1.yy > p2.yy) {
                  return 1;
              } else if (p1.yy < p2.yy) {
                  return -1;
              }
              return 0;
  
          }
          return -1;
      }
  }
  
  class debug {
  
      static void print1d(long[] arr) {
          System.out.println();
          for (int i = 0; i < arr.length; i++) {
              System.out.print(arr[i] + " ");
          }
  
      }
  
      static void print1d(int[] arr) {
          System.out.println();
          for (int i = 0; i < arr.length; i++) {
              System.out.print(arr[i] + " ");
          }
  
      }
  
      static void print1d(boolean[] arr) {
          System.out.println();
          for (int i = 0; i < arr.length; i++) {
              System.out.println(i + "= " + arr[i] + " ");
          }
  
      }
  
      static void print2d(int[][] arr) {
          System.out.println();
          int n = arr.length;
          int n2 = arr[0].length;
          for (int i = 0; i < n; i++) {
              for (int j = 0; j < n2; j++) {
                  System.out.print(arr[i][j] + " ");
              }
              System.out.println();
          }
  
      }
  
      static void print2d(long[][] arr) {
          System.out.println();
          int n = arr.length;
          int n2 = arr[0].length;
          for (int i = 0; i < n; i++) {
              for (int j = 0; j < n2; j++) {
                  System.out.print(arr[i][j] + " ");
              }
              System.out.println();
          }
  
      }
       static void printPair(ArrayList<pair> list) {
          if(list.size()==0){
              System.out.println("empty list");
              return;
          }
         System.out.println();
         for(int i=0;i<list.size();i++){
            System.out.println(list.get(i).xx+"-"+list.get(i).yy);
         }
      }
  
  }
  
  class Reader {
      final private int BUFFER_SIZE = 1 << 16;
      private DataInputStream din;
      private byte[] buffer;
      private int bufferPointer, bytesRead;
  
      public Reader() {
          din = new DataInputStream(System.in);
          buffer = new byte[BUFFER_SIZE];
          bufferPointer = bytesRead = 0;
      }
  
      public Reader(String file_name) throws IOException {
          din = new DataInputStream(new FileInputStream(file_name));
          buffer = new byte[BUFFER_SIZE];
          bufferPointer = bytesRead = 0;
      }
  
      public String readLine() throws IOException {
          byte[] buf = new byte[64]; // line length
          int cnt = 0, c;
          while ((c = read()) != -1) {
              if (c == '\n') {
                  if (cnt != 0) {
                      break;
                  } else {
                      continue;
                  }
              }
              buf[cnt++] = (byte) c;
          }
          return new String(buf, 0, cnt);
      }
  
      public int nextInt() throws IOException {
          int ret = 0;
          byte c = read();
          while (c <= ' ') {
              c = read();
          }
          boolean neg = (c == '-');
          if (neg)
              c = read();
          do {
              ret = ret * 10 + c - '0';
          } while ((c = read()) >= '0' && c <= '9');
  
          if (neg)
              return -ret;
          return ret;
      }
  
      public long nextLong() throws IOException {
          long ret = 0;
          byte c = read();
          while (c <= ' ')
              c = read();
          boolean neg = (c == '-');
          if (neg)
              c = read();
          do {
              ret = ret * 10 + c - '0';
          } while ((c = read()) >= '0' && c <= '9');
          if (neg)
              return -ret;
          return ret;
      }
  
      public double nextDouble() throws IOException {
          double ret = 0, div = 1;
          byte c = read();
          while (c <= ' ')
              c = read();
          boolean neg = (c == '-');
          if (neg)
              c = read();
  
          do {
              ret = ret * 10 + c - '0';
          } while ((c = read()) >= '0' && c <= '9');
  
          if (c == '.') {
              while ((c = read()) >= '0' && c <= '9') {
                  ret += (c - '0') / (div *= 10);
              }
          }
  
          if (neg)
              return -ret;
          return ret;
      }
  
      private void fillBuffer() throws IOException {
          bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
          if (bytesRead == -1)
              buffer[0] = -1;
      }
  
      private byte read() throws IOException {
          if (bufferPointer == bytesRead)
              fillBuffer();
          return buffer[bufferPointer++];
      }
  
      public void close() throws IOException {
          if (din == null)
              return;
          din.close();
      }
  }
    class MultiTreeSet<E> {
  	TreeMap<E, Integer> freqTreeMap = new TreeMap<E, Integer>();
  	int size;
   
  	public MultiTreeSet() {}
   
  	public MultiTreeSet(Collection<? extends E> c) {
  		for(E element : c)
  			add(element);
  	}
      
  	public int size() {
  		return size;
  	}
      public void print(){
          System.out.println(freqTreeMap);
      }
  	public void add(E element) {
  		Integer freq = freqTreeMap.get(element);
  		if(freq==null)
  			freqTreeMap.put(element, 1);
  		else
  			freqTreeMap.put(element,freq+1);
  		++size;
  	}
   
  	public void remove(E element) {
  		Integer freq = freqTreeMap.get(element);
  		if(freq!=null) {
  			if(freq==1)
  				freqTreeMap.remove(element);
  			else
  				freqTreeMap.put(element, freq-1);
  			--size;
  		}
  	}
   
  	public int get(E element) {
  		Integer freq = freqTreeMap.get(element);
  		if(freq==null)
  			return 0;
  		return freq;
  	}
   
  	public boolean contains(E element) {
  		return get(element)>0;
  	}
   
  	public boolean isEmpty() {
  		return size==0;
  	}
   
  	public E first() {
  		return freqTreeMap.firstKey();
  	}
   
  	public E last() {
  		return freqTreeMap.lastKey();
  	}
   
  	public E ceiling(E element) {
  		return freqTreeMap.ceilingKey(element);
  	}
   
  	public E floor(E element) {
  		return freqTreeMap.floorKey(element);
  	}
   
  	public E higher(E element) {
  		return freqTreeMap.higherKey(element);
  	}
   
  	public E lower(E element) {
  		return freqTreeMap.lowerKey(element);
  	}
  }
  