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.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Queue;
import java.util.LinkedList;
import java.util.Collection;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    private static final int MAX = 20050;
    int numVertices;
    int source;
    int sink;
    int[][] cap;
    ArrayList<Integer>[] G;

    int[] prev;
    boolean[] v;
    Queue<Integer> Q;

    ArrayList<Integer>[] edges;

    ArrayList<Integer>[] tables;
    int numTables;

    boolean[] comp;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int N = in.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = in.nextInt();
        }

        genPrimes();

        numVertices = N + 2;
        source = N;
        sink = N + 1;
        G = new ArrayList[numVertices];
        for (int i = 0; i < numVertices; i++) {
            G[i] = new ArrayList<Integer>();
        }
        cap = new int[numVertices][numVertices];

        for (int i = 0; i < N; i++) {
            if ((A[i] & 1) > 0) {
                for (int j = 0; j < N; j++) {
                    if ((A[j] & 1) == 0) {
                        if (!comp[ A[i] + A[j] ]) {
                            addEdge(i, j, 1);
                        }
                    }
                }
            }
        }

        for (int i = 0; i < N; i++) {
            if ((A[i] & 1) > 0) {
                addEdge(source, i, 2);
            }
            else {
                addEdge(i, sink, 2);
            }
        }

        prev = new int[numVertices];
        v = new boolean[numVertices];
        Q = new LinkedList<Integer>();

        int flow = maxFlow();

        if (flow != N) {
            out.println("Impossible");
            return;
        }

        edges = new ArrayList[N];
        for (int i = 0; i < N; i++) {
            edges[i] = new ArrayList<Integer>();
        }
        for (int i = 0; i < N; i++) {
            if ((A[i] & 1) > 0) {
                for (int x : G[i]) {
                    if (x != source && cap[i][x] == 0) {
                        edges[i].add(x);
                        edges[x].add(i);
                    }
                }
            }
        }

        numTables = 0;
        tables = new ArrayList[N / 3];
        for (int i = 0; i < N / 3; i++) {
            tables[i] = new ArrayList<Integer>();
        }

        Arrays.fill(v, false);
        for (int i = 0; i < N; i++) {
            if (!v[i]) {
                dfs(i);
                numTables++;
            }
        }

        out.println(numTables);
        for (int i = 0; i < numTables; i++) {
            out.print(tables[i].size());
            for (int t : tables[i]) {
                out.print(' ');
                out.print(t + 1);
            }
            out.println();
        }
    }

    private void genPrimes() {
        comp = new boolean[MAX];
        for (int i = 2; i < MAX; i++) {
            if (!comp[i]) {
                for (int j = i * i; j < MAX; j += i) {
                    comp[j] = true;
                }
            }
        }
    }

    private void dfs(int node) {
        tables[numTables].add(node);
        v[node] = true;
        for (int x : edges[node]) {
            if (!v[x]) {
                dfs(x);
            }
        }
    }

    private int maxFlow() {
        int flow = 0;
        while (bfs()) {
            int flmin = Integer.MAX_VALUE;
            for (int k = sink; k != source; k = prev[k]) {
                flmin = Math.min(flmin, cap[prev[k]][k]);
            }
            for (int k = sink; k != source; k = prev[k]) {
                cap[prev[k]][k] -= flmin;
                cap[k][prev[k]] += flmin;
            }
            flow += flmin;
        }
        return flow;
    }

    private boolean bfs() {
        Arrays.fill(v, false);
        v[source] = true;
        Q.add(source);

        while (!Q.isEmpty()) {
            int p = Q.remove();
            for (int x : G[p]) {
                if (cap[p][x] > 0 && !v[x]) {
                    prev[x] = p;
                    v[x] = true;
                    Q.add(x);
                }
            }
        }

        return v[sink];
    }

    private void addEdge(int a, int b, int _cap) {
        G[a].add(b);
        G[b].add(a);
        cap[a][b] = _cap;
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    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 nextInt() {
        return Integer.parseInt(nextString());
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

}