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.ArrayDeque;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.io.BufferedReader;
import java.awt.Point;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;

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

class TaskC {

	private ArrayList<ArrayList<Integer>> edges = new ArrayList<>();
	private HashMap<Point, Integer> costs = new HashMap<>();

	public void solve(int testNumber, InputReader in, OutputWriter out) {
		final int n = in.readInt();

		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = in.readInt();
			addVertex();
		}

		final int source = addVertex();
		final int sink = addVertex();
		for (int i = 0; i < n; i++) {
			if (a[i] % 2 == 0) {
				addEdge(source, i, 2);
				for (int j = 0; j < n; j++) {
					if (i != j && a[j] % 2 == 1 && isPrime(a[i] + a[j])) {
						addEdge(i, j, 1);
					}
				}
			} else {
				addEdge(i, sink, 2);
			}
		}

		if (Graph.maxFlow(edges, costs, source, sink) == n) {
			ArrayDeque<ArrayDeque<Integer>> tables = new ArrayDeque<>();
			ArrayDeque<Integer> stack = new ArrayDeque<>();
			boolean[] visited = new boolean[n];

			for (int i = 0; i < n; i++) if (!visited[i]) {
				ArrayDeque<Integer> table = new ArrayDeque<>();
				visited[i] = true;
				stack.push(i);

				while (!stack.isEmpty()) {
					int node = stack.pop();
					table.push(node);
					for (int neigh: edges.get(node)) if (neigh < n && !visited[neigh]) {
						Point p;
						if (a[node] % 2 == 0) {
							p = new Point(node, neigh);
						} else {
							p = new Point(neigh, node);
						}
						if (costs.get(p) == 0) {
							visited[neigh] = true;
							stack.push(neigh);
						}
					}
				}

				tables.push(table);
			}

			out.println(tables.size());
			while (!tables.isEmpty()) {
				ArrayDeque<Integer> table = tables.pop();
				out.print(table.size());
				while (!table.isEmpty()) {
					out.printf(" %d", table.pop() + 1);
				}
				out.println();
			}
		} else {
			out.println("Impossible");
		}
	}

	private boolean isPrime(int n) {
		int max = (int)Math.sqrt(n);
		for (int i = 2; i <= max; i++) {
			if (n % i == 0) {
				return false;
			}
		}
		return n > 1;
	}

	private int addVertex() {
		int pos = edges.size();
		edges.add(new ArrayList<>());
		return pos;
	}

	private void addEdge(int from, int to, int cost) {
		edges.get(from).add(to);
		edges.get(to).add(from);
		costs.put(new Point(from, to), cost);
		costs.put(new Point(to, from), 0);
	}

}

class InputReader {
	private BufferedReader input;
	private StringTokenizer line = new StringTokenizer("");

	public InputReader(InputStream in) {
		input = new BufferedReader(new InputStreamReader(in));
	}

	public void fill() {
		try {
			if(!line.hasMoreTokens()) line = new StringTokenizer(input.readLine());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public int readInt() {
		fill();
		return Integer.parseInt(line.nextToken());
	}
}

class OutputWriter {
	private PrintWriter output;

	public OutputWriter(OutputStream out) {
		output = new PrintWriter(out);
	}

	public void print(Object o) {
		output.print(o);
	}
	public void printf(String format, Object... o) {
		output.printf(format, o);
	}

	public void println(Object o) {
		output.println(o);
	}
	public void println() {
		output.println();
	}

	public void close() {
		output.close();
	}
}

class Graph {

	public static int maxFlow(ArrayList<ArrayList<Integer>> edges,
	                   HashMap<Point, Integer> costs,
	                   int source, int sink) {
		int res = 0;
		int temp;
		while ((temp = findPath(edges, costs, source, sink)) > 0) {
			res += temp;
		}
		return res;
	}

	public static int findPath(ArrayList<ArrayList<Integer>> edges,
	                    HashMap<Point, Integer> costs,
	                    int source, int sink) {
		final int n = edges.size();

		ArrayDeque<Integer> stack = new ArrayDeque<>();
		boolean[] visited = new boolean[n];
		int[] before = new int[n];
		int[] flow = new int[n];
		stack.push(source);
		visited[source] = true;
		Arrays.fill(before, -1);

		while (!stack.isEmpty()) {
			int node = stack.pop();
			for (int neigh: edges.get(node)) if (!visited[neigh]) {
				Point p = new Point(node, neigh);
				int cost = costs.get(p);
				if (cost > 0) {
					stack.push(neigh);
					visited[neigh] = true;
					before[neigh] = node;
					if (node == source) {
						flow[neigh] = cost;
					} else {
						flow[neigh] = Math.min(flow[node], cost);
					}
					if (neigh == sink) {
						stack.clear();
						break;
					}
				}
			}
		}

		if (!visited[sink]) {
			return 0;
		}

		int node = sink;
		while (node != source) {
			Point a = new Point(before[node], node);
			Point b = new Point(node, before[node]);
			costs.put(a, costs.get(a) - flow[sink]);
			costs.put(b, costs.get(b) + flow[sink]);
			node = before[node];
		}

		return flow[sink];
	}

}