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.*;
import java.util.*;

public class C {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void solve() throws IOException {
        int t = 1;
        while (t-- > 0) {
            solveTest();
        }
    }

    boolean[] cieve(int n) {
        boolean[] prime = new boolean[n + 1];
        Arrays.fill(prime, true);
        for (int i = 2; i < n; i++) {
            if (!prime[i]) continue;
            for (int j = i * i; j <= n; j += i) {
                prime[j] = false;
            }
        }
        return prime;
    }

    int n;
    List<Integer>[] g;
    boolean[] used;
    int[] index;

    private void solveTest() throws IOException {
        n = readInt();
        int[] a = new int[n];
        index = new int[n];
        int f = 0;
        int l = n - 1;
        for (int i = 0; i < n; i++) {
            int tmp = readInt();
            if (tmp % 2 != 0) {
                index[f] = i + 1;
                a[f++] = tmp;
            } else {
                index[l] = i + 1;
                a[l--] = tmp;
            }
        }
        int[][] c = new int[n + 2][n + 2];
        for (int i = 0; i < f; i++) {
            c[n][i] = 2;
        }
        for (int i = f; i < n; i++) {
            c[i][n + 1] = 2;
        }
        boolean[] prime = cieve(30000);
        for (int i = 0; i < f; i++) {
            for (int j = f; j < n; j++) {
                if (prime[a[i] + a[j]]) {
                    c[i][j] = 1;
                }
            }
        }

        int[][] flow = new int[n + 2][n + 2];
        while (findPath(c, flow, n + 2, n, n + 1)) ;
        int sum = 0;
        for (int i = 0; i < n + 2; i++) {
            sum += flow[n][i];
        }
        if (sum != n) {
            out.println("Impossible");
            return;
        }
        g = new List[n];
        for (int i = 0; i < n; i++) {
            g[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < f; i++) {
            for (int j = f; j < n; j++) {
                if (flow[i][j] == 1) {
                    g[i].add(j);
                    g[j].add(i);
                }
            }
        }
        used = new boolean[n];
        List<List<Integer>> res = new ArrayList<List<Integer>>();
        for (int i = 0; i < n; i++) {
            if (!used[i]) {
                List<Integer> cur = new ArrayList<Integer>();
                dfs(i, cur);
                res.add(cur);
            }
        }
        out.println(res.size());
        for (List<Integer> component : res) {
            out.print(component.size() + " ");
            for (int v : component) {
                out.print(v + " ");
            }
            out.println();
        }
    }

    void dfs(int v, List<Integer> component) {
        used[v] = true;
        component.add(index[v]);
        for (int to : g[v]) {
            if (!used[to]) {
                dfs(to, component);
            }
        }
    }


    boolean findPath(int[][] c, int[][] f, int size, int s, int t) {
        ArrayDeque<Integer> q = new ArrayDeque<Integer>();
        boolean[] used = new boolean[size];
        int[] p = new int[size];
        q.add(s);
        used[s] = true;
        p[s] = -1;
        while (!used[t] && !q.isEmpty()) {
            int cur = q.pollFirst();
            for (int to = 0; to < size; to++) {
                if (!used[to] && c[cur][to] - f[cur][to] > 0) {
                    q.add(to);
                    used[to] = true;
                    p[to] = cur;
                }
            }
        }
        if (!used[t]) {
            return false;
        }
        int currentFlow = -1;
        int curV = t;
        while (curV != s) {
            int prev = p[curV];
            int edgeFlow = c[prev][curV] - f[prev][curV];
            if (currentFlow == -1 || currentFlow > edgeFlow) {
                currentFlow = edgeFlow;
            }
            curV = prev;
        }
        curV = t;
        while (curV != s) {
            int prev = p[curV];
            f[prev][curV] += currentFlow;
            f[curV][prev] -= currentFlow;
            curV = prev;
        }
        return true;
    }

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine(), " .");
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int[] readArr(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readArrL(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = readLong();
        }
        return res;
    }

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

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }
}