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:
//package codeforces;

import java.io.*;
import java.nio.charset.CharsetEncoder;
import java.util.*;

public class C {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(System.out);
    StringTokenizer stringTokenizer;

    C() throws IOException {
//        reader = new BufferedReader(new FileReader("bridges.in"));
//        writer = new PrintWriter(new FileWriter("bridges.out"));
    }

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    final int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    int pow(int x, int k) {
        int result = 1;
        while (k > 0) {
            if (k % 2 == 1) {
                result = product(result, x);
            }
            x = product(x, x);
            k /= 2;
        }
        return result;
    }

    int inv(int x) {
        return pow(x, MOD - 2);
    }

    boolean isPrime(int x) {
        for (int i = 2; i * i <= x; i++) {
            if (x % i == 0) return false;
        }
        return true;
    }

    void solve() throws IOException {
        final int n = nextInt();
        int[] a = new int[n];
        int even = 0, odd = 0;
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
            if (a[i] % 2 == 0) even++;
            else odd++;
        }
        if (even != odd) {
            writer.println("Impossible");
            writer.close();
            return;
        }
        final int[] left = new int[n / 2];
        final int[] right = new int[n / 2];
        int li = 0, ri = 0;
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                left[li++] = i;
            } else {
                right[ri++] = i;
            }

        }
        final int[][] g = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                g[i][j] = g[j][i] = isPrime(a[i] + a[j]) ? 1 : 0;
            }
        }
        class Utils {
            int[] enter = new int[n];
            int[] foo = new int[n];
            int[] parent = new int[n];

            {
                Arrays.fill(parent, -1);
            }

            int time = 0;
            boolean[] used = new boolean[n];

            void dfs(int u) {
                used[u] = true;
                enter[u] = ++time;
                foo[u] = enter[u];
                for (int v = 0; v < n; v++) {
                    if (g[u][v] == 1 && v != parent[u]) {
                        if (used[v]) {
                            foo[u] = Math.min(foo[u], enter[v]);
                        } else {
                            parent[v] = u;
                            dfs(v);
                            foo[u] = Math.min(foo[u], foo[v]);
                        }
                    }
                }
            }

            boolean maxMatch() {
                for(int i = 0; i < n / 2; i++) {
                    Arrays.fill(used, false);
                    if(!findChain(i)) {
                        return false;
                    }
                }
                return true;
            }

            int[] next = new int[n];
            int[] prev = new int[n];

            {
                Arrays.fill(prev, -1);
            }

            boolean findChain(int u) {
                used[u] = true;
                int x = left[u];
                for(int v = 0; v < right.length; v++) {
                    int y = right[v];
                    if(g[x][y] != 1) {
                        continue;
                    }
                    if(prev[v] == -1 || (!used[prev[v]] && findChain(prev[v]))) {
                        next[u] = v;
                        prev[v] = u;
                        return true;
                    }
                }
                return false;
            }
        }
        Utils utils = new Utils();
        for (int i = 0; i < n; i++) {
            if (!utils.used[i]) {
                utils.dfs(i);
            }
        }
        for (int u = 0; u < n; u++) {
            int parent = utils.parent[u];
            if (parent != -1 && utils.foo[u] == utils.enter[u]) {
                g[u][parent] = g[parent][u] = 0;
            }
        }
        if(!utils.maxMatch()) {
            writer.println("Impossible");
            writer.close();
            return;
        }
        int[] next = new int[n / 2];
        System.arraycopy(utils.next, 0, next, 0, n / 2);
        for(int i = 0; i < next.length; i++) {
            int u = left[i];
            int v = right[next[i]];
            g[u][v] = g[v][u] = 0;
        }
        Arrays.fill(utils.prev, -1);
        if(!utils.maxMatch()) {
            writer.println("Impossible");
            writer.close();
            return;
        }
        int[] prev = utils.prev;
        List<List<Integer>> answer = new ArrayList<>();
        boolean[] used = new boolean[n / 2];
        for(int i = 0; i < n / 2; i++) {
            if(!used[i]) {
                List<Integer> table = new ArrayList<>();
                for(int u = i; !used[u];) {
                    used[u] = true;
                    table.add(left[u]);
                    int v = next[u];
                    table.add(right[v]);
                    u = prev[v];
                }
                answer.add(table);
            }
        }
        writer.println(answer.size());
        for (List<Integer> table : answer) {
            writer.print(table.size());
            for (Integer fox : table) {
                writer.print(" " + (fox + 1));
            }
            writer.println();
        }
        writer.close();
    }

    public static void main(String[] args) throws IOException {
        new C().solve();
    }
}