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.OutputStream;
  import java.io.PrintWriter;
  import java.io.BufferedWriter;
  import java.util.InputMismatchException;
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.List;
  import java.io.Writer;
  import java.io.OutputStreamWriter;
  import java.io.InputStream;
  
  /**
   * Built using CHelper plug-in
   * Actual solution is at the top
   *
   * @author Roy
   */
  public class Main {
      public static void main(String[] args) {
          InputStream inputStream = System.in;
          OutputStream outputStream = System.out;
          InputReader in = new InputReader(inputStream);
          OutputWriter out = new OutputWriter(outputStream);
          AWindblumeOde solver = new AWindblumeOde();
          solver.solve(1, in, out);
          out.close();
      }
  
      static class AWindblumeOde {
          public void solve(int testNumber, InputReader in, OutputWriter out) {
              Sieve sieve = new Sieve((int) 2E6 + 10);
              int testCases = in.readInteger();
              for (int cs = 1; cs <= testCases; ++cs) {
                  int n = in.readInteger(), total = 0;
                  List<Integer> a = new ArrayList<>();
                  for (int i = 0; i < n; i++) {
                      a.add(in.readInteger());
                      total += a.get(i);
                  }
                  if (!sieve.isPrime(total)) {
                      out.printLine(n);
                      for (int i = 1; i <= n; i++) out.print(i + " ");
                  } else {
                      int minOddNumber = Integer.MAX_VALUE, minOddPos = -1;
                      for (int i = 0; i < n; i++) {
                          if (MathUtility.isOdd(a.get(i)) && a.get(i) < minOddNumber) {
                              minOddPos = i;
                              minOddNumber = a.get(i);
                          }
                      }
                      out.printLine(n - 1);
                      for (int i = 0; i < n; i++) if (i != minOddPos) out.print((i + 1) + " ");
                  }
                  out.printLine();
              }
          }
  
      }
  
      static class Sieve {
          private final int n;
          private final List<Boolean> isPrime;
          private final List<Integer> primes = new ArrayList<>();
  
          private void generatePrimes() {
              //~ implementation details: https://shikhorroy.wordpress.com/2013/11/12/wp-mep2mliv-5r/
              if (n >= 0) isPrime.set(0, false);
              if (n >= 1) isPrime.set(1, false);
              if (n >= 2) isPrime.set(2, true);
              for (int i = 3; i <= n; i += 2) isPrime.set(i, true);
  
              if (n >= 2) primes.add(2);
              for (int x = 3; x <= n; x += 2) {//~ apply sieve method only for odd numbers
                  if (isPrime.get(x)) {
                      primes.add(x);
                      if ((long) x * x <= n) for (int i = x * x; i <= n; i += (2 * x)) {
                          isPrime.set(i, false);
                      }
                  }
              }
          }
  
          public Sieve(int n) {
              this.n = n;
              isPrime = new ArrayList<>();
              for (int i = 0; i <= n; i++) isPrime.add(false);
              this.generatePrimes();
          }
  
          public boolean isPrime(int x) {
              if (x > n) throw new RuntimeException(x + " is out of range.");
              return isPrime.get(x);
          }
  
      }
  
      static class OutputWriter {
          private final PrintWriter writer;
  
          public OutputWriter(OutputStream outputStream) {
              writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
          }
  
          public OutputWriter(Writer writer) {
              this.writer = new PrintWriter(writer);
          }
  
          public void print(Object... objects) {
              for (int i = 0; i < objects.length; i++) {
                  if (i != 0) {
                      writer.print(' ');
                  }
                  writer.print(objects[i]);
              }
          }
  
          public void printLine(Object... objects) {
              this.print(objects);
              writer.println();
          }
  
          public void close() {
              writer.flush();
              writer.close();
          }
  
      }
  
      static class MathUtility {
          public static <T> boolean isOdd(T number) {
              long longNumber = Long.parseLong(number.toString());
              return ((longNumber & 1) > 0);
          }
  
      }
  
      static class InputReader {
          private int curChar;
          private int numChars;
          private InputReader.SpaceCharFilter filter;
          private final InputStream stream;
          private final byte[] buf = new byte[1024];
  
          public InputReader(InputStream stream) {
              this.stream = stream;
          }
  
          private long readWholeNumber(int c) {
              long res = 0;
              do {
                  if (c < '0' || c > '9') {
                      throw new InputMismatchException();
                  }
                  res *= 10;
                  res += c - '0';
                  c = read();
              } while (!isSpaceChar(c));
              return res;
          }
  
          public int read() {
              if (numChars == -1) {
                  throw new InputMismatchException();
              }
              if (curChar >= numChars) {
                  curChar = 0;
                  try {
                      numChars = stream.read(buf);
  
                  } catch (IOException e) {
                      throw new InputMismatchException();
                  }
                  if (numChars <= 0) {
                      return -1;
                  }
              }
              return buf[curChar++];
          }
  
          public int readInteger() {
              int c = read();
              while (isSpaceChar(c)) {
                  c = read();
              }
              int sgn = 1;
              if (c == '-') {
                  sgn = -1;
                  c = read();
              }
              int res = (int) readWholeNumber(c);
              return res * sgn;
          }
  
          public boolean isSpaceChar(int c) {
              if (filter != null) {
                  return filter.isSpaceChar(c);
              }
              return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
          }
  
          public interface SpaceCharFilter {
              boolean isSpaceChar(int ch);
  
          }
  
      }
  }
  
  