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.OutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.PrintWriter;
  import java.io.PrintStream;
  import java.util.Random;
  import java.util.ArrayList;
  import java.io.InputStream;
  
  /**
   * Built using CHelper plug-in
   * Actual solution is at the top
   *
   * @author sarthakmanna
   */
  public class Main {
      public static void main(String[] args) {
          InputStream inputStream = System.in;
          OutputStream outputStream = System.out;
          FastReader in = new FastReader(inputStream);
          PrintWriter out = new PrintWriter(outputStream);
          AWindblumeOde solver = new AWindblumeOde();
          int testCount = Integer.parseInt(in.next());
          for (int i = 1; i <= testCount; i++)
              solver.solve(i, in, out);
          out.close();
      }
  
      static class AWindblumeOde {
          final static Helper hp = new Helper();
  
          public void solve(int testNumber, FastReader in, PrintWriter out) {
              int i, j, k;
  
              int N = in.nextInt();
              int[] A = in.getIntArray(N);
  
              int sum = (int) hp.sum(A);
              if (!hp.isProbablePrime(sum, 20)) {
                  out.println(N);
                  for (i = 0; i < N; ++i) {
                      out.print(i + 1 + " ");
                  }
                  out.println();
              } else {
                  int idx;
                  for (idx = 0; hp.isProbablePrime(sum - A[idx], 20); ++idx) ;
                  out.println(N - 1);
                  for (i = 0; i < N; ++i) if (i != idx) out.print(i + 1 + " ");
                  out.println();
              }
          }
  
      }
  
      static class FastReader {
          static final int BUFSIZE = 1 << 20;
          static byte[] buf;
          static int index;
          static int total;
          static InputStream in;
  
          public FastReader(InputStream is) {
              try {
                  in = is;
                  buf = new byte[BUFSIZE];
              } catch (Exception e) {
              }
          }
  
          private int scan() {
              try {
                  if (index >= total) {
                      index = 0;
                      total = in.read(buf);
                      if (total <= 0)
                          return -1;
                  }
                  return buf[index++];
              } catch (Exception | Error e) {
                  System.err.println(e.getMessage());
                  return 13 / 0;
              }
          }
  
          public String next() {
              int c;
              for (c = scan(); c <= 32; c = scan()) ;
              StringBuilder sb = new StringBuilder();
              for (; c > 32; c = scan())
                  sb.append((char) c);
              return sb.toString();
          }
  
          public int nextInt() {
              int c, val = 0;
              for (c = scan(); c <= 32; c = scan()) ;
              boolean neg = c == '-';
              if (c == '-' || c == '+')
                  c = scan();
              for (; c >= '0' && c <= '9'; c = scan())
                  val = (val << 3) + (val << 1) + (c & 15);
              return neg ? -val : val;
          }
  
          public int[] getIntArray(int size) {
              int[] ar = new int[size];
              for (int i = 0; i < size; ++i) ar[i] = nextInt();
              return ar;
          }
  
      }
  
      static class Helper {
          public final long MOD;
          public final int MAXN;
          final Random rnd;
          public static int[] sieve;
          public static ArrayList<Integer> primes;
  
          public Helper() {
              MOD = 1000_000_007;
              MAXN = 1000_006;
              rnd = new Random();
          }
  
          public Helper(long mod, int maxn) {
              MOD = mod;
              MAXN = maxn;
              rnd = new Random();
          }
  
          public void setSieve() {
              if (sieve == null || sieve.length < MAXN) {
                  primes = new ArrayList<>();
                  sieve = new int[MAXN];
                  int i, j;
                  for (i = 2; i < MAXN; ++i) {
                      if (sieve[i] == 0) {
                          primes.add(i);
                          for (j = i; j < MAXN; j += i) {
                              sieve[j] = i;
                          }
                      }
                  }
              }
          }
  
          public boolean isPrime(int number) {
              setSieve();
              return number > 1 && sieve[number] == number;
          }
  
          public boolean isProbablePrime(int number, int certainty) {
              if (number < MAXN) return isPrime(number);
              else if ((number & 1) == 0) return false;
  
              long d = number - 1;
              int r = 0;
              while ((d & 1) == 0) {
                  ++r;
                  d >>= 1;
              }
              while (--certainty >= 0) { // witness loop
                  long a = getRandomInRange(2, Math.min(Integer.MAX_VALUE - 7, number - 2));
                  long x = pow(a, d, number);
  
                  if (x == 1 || x == number - 1) {
                      continue;
                  } else {
                      boolean witnessFound = false;
                      for (int i = 1; i < r && x > 1; ++i) { // loop runs r - 1 times atmost
                          x = x * x % number;
                          if (x == number - 1) {
                              witnessFound = true;
                              break;
                          }
                      }
                      if (!witnessFound) return false;
                  }
              }
              return true;
          }
  
          public long sum(int... ar) {
              long sum = 0;
              for (int itr : ar) sum += itr;
              return sum;
          }
  
          public long pow(long base, long exp, long MOD) {
              base %= MOD;
              long ret = 1;
              while (exp > 0) {
                  if ((exp & 1) == 1) ret = ret * base % MOD;
                  base = base * base % MOD;
                  exp >>= 1;
              }
              return ret;
          }
  
          public int getRandomInRange(int l, int r) {
              return rnd.nextInt(r - l + 1) + l;
          }
  
      }
  }
  
  