Problem: Fox Ciel is participating in a party in Prime Kingdom. There are n foxes there (include Fox Ciel). The i-th fox is ai years old.

They will have dinner around some round tables. You want to distribute foxes such that:

  1. Each fox is sitting at some table. 
  2. Each table has at least 3 foxes sitting around it. 
  3. The sum of ages of any two adjacent foxes around each table should be a prime number. 



If k foxes f1, f2, ..., fk are sitting around table in clockwise order, then for 1 ≤ i ≤ k - 1: fi and fi + 1 are adjacent, and f1 and fk are also adjacent.

If it is possible to distribute the foxes in the desired manner, find out a way to do that.

Input

The first line contains single integer n (3 ≤ n ≤ 200): the number of foxes in this party. 

The second line contains n integers ai (2 ≤ ai ≤ 104).

Output

If it is impossible to do this, output "Impossible".

Otherwise, in the first line output an integer m (<image>): the number of tables.

Then output m lines, each line should start with an integer k -=– the number of foxes around that table, and then k numbers — indices of fox sitting around that table in clockwise order.

If there are several possible arrangements, output any of them.

Examples

Input

4
3 4 8 9


Output

1
4 1 2 4 3


Input

5
2 2 2 2 2


Output

Impossible


Input

12
2 3 4 5 6 7 8 9 10 11 12 13


Output

1
12 1 2 3 6 5 12 9 8 7 10 11 4


Input

24
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


Output

3
6 1 2 3 6 5 4
10 7 8 9 12 15 14 13 16 11 10
8 17 18 23 22 19 20 21 24

Note

In example 1, they can sit around one table, their ages are: 3-8-9-4, adjacent sums are: 11, 17, 13 and 7, all those integers are primes.

In example 2, it is not possible: the sum of 2+2 = 4 is not a prime number.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

  public static void main(String[] args) throws IOException {
    IOScanner scanner;
    if (new File("data.in").exists()) {
      scanner = new IOScanner("data.in", null);
    } else {
      scanner = new IOScanner();
    }
    while (scanner.hasNext()) {
      new Solver(scanner).solve();
    }
    scanner.close();
  }
}

class IOScanner {
  private final BufferedReader reader;
  private final PrintWriter writer;
  private StringTokenizer stringTokenizer;

  public IOScanner() {
    this(System.in, System.out);
  }

  public IOScanner(String input, String output) throws FileNotFoundException {
    this(input == null ? null : new File(input), output == null ? null : new File(output));
  }

  public IOScanner(File input, File output) throws FileNotFoundException {
    this(input == null ? System.in : new FileInputStream(input), output == null ? System.out
        : new FileOutputStream(output));
  }

  public IOScanner(InputStream inputStream, OutputStream outputStream) {
    reader = new BufferedReader(new InputStreamReader(inputStream));
    writer = new PrintWriter(outputStream);
  }

  private StringTokenizer read() {
    while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
      try {
        stringTokenizer = new StringTokenizer(reader.readLine());
      } catch (Exception e) {
        return null;
      }
    }
    return stringTokenizer;
  }

  public boolean hasNext() {
    StringTokenizer tokenizer = read();
    return tokenizer != null && tokenizer.hasMoreTokens();
  }

  public int nextInt() {
    return Integer.parseInt(read().nextToken());
  }

  public long nextLong() {
    return Long.parseLong(read().nextToken());
  }

  public int[] nextInts(int n) {
    int[] input = new int[n];
    for (int i = 0; i < n; i++) {
      input[i] = nextInt();
    }
    return input;
  }

  public String[] nexts(int n) {
    String[] input = new String[n];
    for (int i = 0; i < n; i++) {
      input[i] = next();
    }
    return input;
  }

  public char[][] nextCharArrays(int n) {
    String[] input = nexts(n);
    char[][] result = new char[n][];
    for (int i = 0; i < n; i++) {
      result[i] = input[i].toCharArray();
    }
    return result;
  }

  public String next() {
    return read().nextToken();
  }

  public void println() {
    writer.println();
  }

  public void println(Object token) {
    writer.println(token);
  }

  public void print(Object token) {
    writer.print(token);
  }

  public void printf(String format, Object... args) {
    writer.printf(format, args);
  }

  public void flush() {
    writer.flush();
  }

  public void close() throws IOException {
    reader.close();
    writer.close();
  }
}

class Solver {

  private static final int M = 200005;
  private static final boolean[] isPrime = new boolean[M];

  static {
    int[] primes = new int[M];
    int top = 0;
    Arrays.fill(isPrime, true);
    isPrime[0] = isPrime[1] = false;
    for (int i = 2; i < M; i++) {
      if (isPrime[i]) {
        primes[top++] = i;
      }
      for (int j = 0; j < top && i * primes[j] < M; j++) {
        isPrime[i * primes[j]] = false;
      }
    }
  }

  private final IOScanner scanner;

  public Solver(IOScanner scanner) {
    this.scanner = scanner;
  }

  private int m, s, t;
  private int[][] flow;
  private boolean[] visited;

  public void solve() {
    int n = scanner.nextInt();
    m = n + 2;
    s = m - 2;
    t = m - 1;
    int[] arr = scanner.nextInts(n);

    flow = new int[m][m];
    visited = new boolean[m];
    for (int i = 0; i < m; i++) {
      visited[i] = false;
      for (int j = 0; j < m; j++) {
        flow[i][j] = 0;
      }
    }

    for (int i = 0; i < n; i++) {
      if (arr[i] % 2 == 0) {
        flow[s][i] = 2;
      } else {
        flow[i][t] = 2;
      }
      for (int j = i + 1; j < n; j++) {
        if (isPrime[arr[i] + arr[j]]) {
          if (arr[i] % 2 == 0) {
            flow[i][j] = 1;
          } else {
            flow[j][i] = 1;
          }
        }
      }
    }

    int result = 0;
    while (true) {
      Arrays.fill(visited, false);
      if (dfs(s)) {
        result++;
      } else {
        break;
      }
    }
    if (result != n) {
      scanner.println("Impossible");
      return;
    }

    int[][] mp = new int[n][3];
    int[] p = new int[n];
    for (int i = 0; i < n; i++) {
      mp[i][0] = 0;
      p[i] = i;
    }

    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        if (isPrime[arr[i] + arr[j]]) {
          if (arr[i] % 2 == 0 && flow[i][j] == 0 || arr[i] % 2 == 1 && flow[j][i] == 0) {
            mp[i][++mp[i][0]] = j;
            mp[j][++mp[j][0]] = i;
            p[find(p, i)] = find(p, j);
          }
        }
      }
    }
    int count = 0;
    int[] sum = new int[n];
    Arrays.fill(sum, 0);
    for (int i = 0; i < n; i++) {
      sum[find(p, i)]++;
      if (find(p, i) == i) {
        count++;
      }
    }
    scanner.println(count);
    for (int i = 0; i < n; i++) {
      if (p[i] != -1 && find(p, i) == i) {
        scanner.print(sum[i]);
        for (int u = i, j = 0; j < sum[i]; j++) {
          scanner.print(" " + (u + 1));
          p[u] = -1;
          if (p[mp[u][1]] != -1) {
            u = mp[u][1];
          } else {
            u = mp[u][2];
          }
        }
        scanner.println();
      }
    }
  }

  private int find(int[] p, int x) {
    return p[x] == x ? x : (p[x] = find(p, p[x]));
  }

  private boolean dfs(int u) {
    visited[u] = true;
    if (u == t) {
      return true;
    }
    for (int v = 0; v < m; v++) {
      if (!visited[v] && flow[u][v] > 0) {
        if (dfs(v)) {
          flow[u][v]--;
          flow[v][u]++;
          return true;
        }
      }
    }
    return false;
  }
}