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.util.Arrays;
import java.util.ArrayList;
import java.util.function.Consumer;
import java.util.ArrayDeque;
import java.io.InputStream;
import java.util.List;
import java.util.Collection;
import java.util.Scanner;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Queue;
import java.io.IOException;

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

class TaskC {
    int n;
    CapacityGraph g;
    int[] V;
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        n = in.nextInt();
        g = new CapacityGraph(n + 2, 2 * n * (n + 1));
        Sieve sieve = new Sieve(20000);
        V = new int[n];
        for (int i = 0; i < n; ++i)
            V[i] = in.nextInt();
        for (int i = 0; i < n; ++i) {
            if ((V[i] & 1) > 0) {
                g.addEdge(n, i, 2);
                for (int j = 0; j < n; ++j)
                    if (sieve.isPrime(V[i] + V[j]))
                        g.addEdge(i, j, 1);
            } else {
                g.addEdge(i, n + 1, 2);
            }
        }
        if (g.maxFlow(n, n+1) == n) {
            List<List<Integer>> cycles = buildCycles();
            out.println(cycles.size());
            for (List<Integer> c : cycles) {
                out.print(c.size());
                for (Integer u : c)
                    out.printf(" %d", u + 1);
                out.println();
            }
        } else {
            out.println("Impossible");
        }
    }
    boolean[] visited;
    List<List<Integer>> buildCycles() {
        List<List<Integer>> cycles = new ArrayList<>();
        visited = new boolean[n];
        for (int i = 0; i < n; ++i)
            if (!visited[i]) {
                List<Integer> cycle = new ArrayList<>();
                dfs(i, cycle);
                cycles.add(cycle);
            }
        return cycles;
    }
    void dfs(int u, List<Integer> cycle) {
        visited[u] = true;
        cycle.add(u);
        g.forEachEdge(u, (Integer edge) -> {
            int v = g.getAdj(edge);
            if (v < n && !visited[v] && (
                    ((V[v] & 1) > 0) == (g.getCap(edge) > 0)))
                dfs(v, cycle);
        });
    }
}

class CapacityGraph extends Graph {
    protected int[] cap;
    protected int[] level;
    protected int[] currentEdge;
    private int dst;
    public CapacityGraph(int n, int m) {
        super(n, m);
        cap = new int[m];
        level = new int[n];
    }
    public void addEdge(int from, int to, int cap) {
        this.cap[edgeCount] = cap;
        super.addBiEdge(from, to);
    }

    public int getCap(int edge) {
        return cap[edge];
    }
    private boolean buildLevel(int src, int dst) {
        Arrays.fill(level, -1);
        Queue<Integer> queue = new ArrayDeque<>(vertexCount);
        queue.add(dst);
        level[dst] = 1;
        while (!queue.isEmpty()) {
            int u = queue.poll();
            for (int edge = last[u]; edge != -1; edge = prev[edge]) {
                int v = adj[edge];
                if (cap[edge ^ 1] > 0 && level[v] == -1) {
                    queue.add(v);
                    level[v] = level[u] + 1;
                }
            }
        }
        return level[src] > -1;
    }
    int dfs(int u, int minCap) {
        if (u == dst) return minCap;
        for (int edge = currentEdge[u]; edge != -1; edge = currentEdge[u] = prev[edge]) {
            int v = adj[edge];
            if (cap[edge] > 0 && level[v] == level[u] - 1) {
                int augment = dfs(v, Math.min(minCap, cap[edge]));
                if (augment > 0) {
                    cap[edge] -= augment;
                    cap[edge ^ 1] += augment;
                    return augment;
                }
            }
        }
        return 0;
    }
    public long maxFlow(int src, int dst) {
        this.dst = dst;
        long ans = 0;
        int augment;
        currentEdge = new int[vertexCount];
        while (buildLevel(src, dst)) {
            System.arraycopy(last, 0, currentEdge, 0, vertexCount);
            while ((augment = dfs(src, Integer.MAX_VALUE)) > 0)
                ans += augment;
        }
        return ans;
    }
}

class Sieve {
    protected int[] factor;
    public Sieve(int n) {
        factor = new int[(n+1)>>1];
        factor[0] = 1;
        for (int i = 3; i <= n; i += 2)
            if (factor[i>>1] == 0) {
                factor[i>>1] = i;
                if ((long) i * i <= n)
                    for (int j = i * i; j <= n; j += (i << 1))
                        factor[j>>1] = i;
            }
    }
    public boolean isPrime(int x) {
        return (x & 1) == 0 ? x == 2 : factor[x>>1] == x;
    }
}

class Graph {
    protected int[] adj, prev, last;
    protected int edgeCount;
    protected int vertexCount;
    public Graph(int n, int m) {
        vertexCount = n;
        edgeCount = 0;
        adj = new int[m];
        prev = new int[m];
        last = new int[n];
        Arrays.fill(last, -1);
    }
    public void addEdge(int from, int to) {
        adj[edgeCount] = to;
        prev[edgeCount] = last[from];
        last[from] = edgeCount++;
    }
    public void addBiEdge(int u, int v) {
        addEdge(u, v);
        addEdge(v, u);
    }

    public int getAdj(int edge) {
        return adj[edge];
    }
    public void forEachEdge(int u, Consumer<Integer> exeEdge) {
        for (int edge = last[u]; edge != -1; edge = prev[edge])
            exeEdge.accept(edge);
    }
}