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.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.util.*;
   
  public class Solution{
  static FastScanner sc = new FastScanner();
  static boolean[] prime=sieveOfEratosthenes(20005);
  public static void solve() {
      int n=sc.nextInt();
      int[] a=sc.readArray(n);
      int sum=0;
      for (int i=0;i<n;i++) {
        sum+=a[i];
      }
      if (prime[sum]) {
        System.out.println(n-1);
        for (int i=0;i<n;i++) {
          if (!prime[sum-a[i]]) {
            for (int j=0;j<n;j++) {
              if (i!=j) {
                System.out.print((j+1)+" ");
              }
            }
            System.out.println("");
            break;
          }
        }
      }else{
        System.out.println(n);
        for (int i=1;i<=n;i++ ) {
          System.out.print(i+" ");
        }
        System.out.println("");
      }
        
    }
    public void dfs(List<List<Integer>> g,int i,int[] dp,boolean[] vis,int depth){
        vis[i]=true;
        
    }
  public static void main(String[] args) {
    int t = sc.nextInt();
    // int t=1;
    outer: for (int tt = 0; tt < t; tt++) {
      solve();
    }
  
  }
  static long getPairsCount(int n, double sum,int[] arr)
      {
          HashMap<Double, Integer> hm = new HashMap<>();
          for (int i = 0; i < n; i++) {
              if (!hm.containsKey((double)arr[i]))
                  hm.put((double)arr[i], 0);
              hm.put((double)arr[i], hm.get((double)arr[i]) + 1);
          }
          long twice_count = 0;
          for (int i = 0; i < n; i++) {
              if (hm.get(sum - arr[i]) != null)
                  twice_count += hm.get(sum - arr[i]);
              if (sum - (double)arr[i] == (double)arr[i])
                  twice_count--;
          }
          return twice_count / 2l;
      }
  static boolean[] sieveOfEratosthenes(int n)
      {
          boolean prime[] = new boolean[n + 1];
          for (int i = 0; i <= n; i++)
              prime[i] = true;
   
          for (int p = 2; p * p <= n; p++)
          {
              if (prime[p] == true)
              {
                  for (int i = p * p; i <= n; i += p)
                      prime[i] = false;
              }
          }
          return prime;
   }
  static long power(long x, long y, long p)
    {
      long res = 1l; 
      x = x % p;
      if (x == 0)
        return 0;
      while (y > 0)
      {
  
        if ((y & 1) != 0)
          res = (res * x) % p;
        y>>=1;
        x = (x * x) % p;
      }
      return res;
    }
  
  public static int log2(int N)
      {
          int result = (int)(Math.log(N) / Math.log(2));
    
          return result;
      }
  
  ////////////////////////////////////////////////////////////////////////////////////
  ////////////////////DO NOT READ AFTER THIS LINE //////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////
  static long modFact(int n, 
                         int p) 
      { 
          if (n >= p) 
              return 0; 
        
          long result = 1l; 
          for (int i = 3; i <= n; i++) 
              result = (result * i) % p; 
        
          return result; 
      } 
        
  static boolean isPalindrom(char[] arr, int i, int j) {
    boolean ok = true;
    while (i <= j) {
      if (arr[i] != arr[j]) {
        ok = false;
        break;
      }
      i++;
      j--;
    }
    return ok;
  }
  
  static int max(int a, int b) {
    return Math.max(a, b);
  }
  
  static int min(int a, int b) {
    return Math.min(a, b);
  }
  
  static long max(long a, long b) {
    return Math.max(a, b);
  }
  
  static long min(long a, long b) {
    return Math.min(a, b);
  }
  
  static int abs(int a) {
    return Math.abs(a);
  }
  
  static long abs(long a) {
    return Math.abs(a);
  }
  
  static void swap(long arr[], int i, int j) {
    long temp = arr[i];
    arr[i] = arr[j];
    arr[j] = temp;
  }
  
  static void swap(int arr[], int i, int j) {
    int temp = arr[i];
    arr[i] = arr[j];
    arr[j] = temp;
  }
  
  static int maxArr(int arr[]) {
    int maxi = Integer.MIN_VALUE;
    for (int x : arr)
      maxi = max(maxi, x);
    return maxi;
  }
  
  static int minArr(int arr[]) {
    int mini = Integer.MAX_VALUE;
    for (int x : arr)
      mini = min(mini, x);
    return mini;
  }
  
  static long maxArr(long arr[]) {
    long maxi = Long.MIN_VALUE;
    for (long x : arr)
      maxi = max(maxi, x);
    return maxi;
  }
  
  static long minArr(long arr[]) {
    long mini = Long.MAX_VALUE;
    for (long x : arr)
      mini = min(mini, x);
    return mini;
  }
  static int lcm(int a,int b){
    return (int)(((long)a*b)/(long)gcd(a,b));
  }
  static int gcd(int a, int b) {
    if (b == 0)
      return a;
    return gcd(b, a % b);
  }
  
  static long gcd(long a, long b) {
    if (b == 0)
      return a;
    return gcd(b, a % b);
  }
  
  static void ruffleSort(int[] a) {
    int n = a.length;
    Random r = new Random();
    for (int i = 0; i < a.length; i++) {
      int oi = r.nextInt(n);
      int temp = a[i];
      a[i] = a[oi];
      a[oi] = temp;
    }
    Arrays.sort(a);
  }
  
  public static int binarySearch(int a[], int target) {
    int left = 0;
    int right = a.length - 1;
    int mid = (left + right) / 2;
    int i = 0;
    while (left <= right) {
      if (a[mid] <= target) {
        i = mid + 1;
        left = mid + 1;
      } else {
        right = mid - 1;
      }
      mid = (left + right) / 2;
    }
    return i-1;
  }
  
  static class FastScanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
  
    String next() {
      while (!st.hasMoreTokens())
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      return st.nextToken();
    }
  
    int nextInt() {
      return Integer.parseInt(next());
    }
  
    int[] readArray(int n) {
      int[] a = new int[n];
      for (int i = 0; i < n; i++)
        a[i] = nextInt();
      return a;
    }
  
    long[] readLongArray(int n) {
      long[] a = new long[n];
      for (int i = 0; i < n; i++)
        a[i] = nextLong();
      return a;
    }
  
    int[][] read2dArray(int n, int m) {
      int arr[][] = new int[n][m];
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          arr[i][j] = nextInt();
        }
      }
      return arr;
    }
  
    ArrayList<Integer> readArrayList(int n) {
      ArrayList<Integer> arr = new ArrayList<Integer>();
      for (int i = 0; i < n; i++) {
        int a = nextInt();
        arr.add(a);
      }
      return arr;
    }
  
    long nextLong() {
      return Long.parseLong(next());
    }
  }
   static class Pair {
    int l, r;
  
    Pair(int fr, int sc) {
      this.l = fr;
      this.r = sc;
    }
  }
  
  ////////////////////////////////////////////////////////////////////////////////////  
  
  }
   // List<Integer> rem=new ArrayList<>();
   //        for (int j=1;j<=n;j++) {
   //          if (done[j]) {
   //            continue;
   //          }
   //          if (g.get(j).size()==0){
   //            done[j]=true;
   //            continue;
   //          }
   //          if (g.get(j).size()==1) {
   //            rem.add(j);
   //            int x=j;
   //            int y=g.get(j).get(0);
   //            g.get(x).remove(new Integer(y));
   //            if (g.get(x).size()==0) {
   //              done[x]=true;
   //            }
   //          }
            
   //        }
   //        for (int j=1;j<=n;j++) {
   //            g.get(j).removeAll(rem);
   //          }