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<>();
	private int source;
	private int sink;

	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();
		}
		source = addVertex();
		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 (A[j] % 2 == 1 && XMath.isPrime(A[i] + A[j])) {
					addEdge(i, j, 1);
				}
			} else {
				addEdge(i, sink, 2);
			}
		}

		if (maxFlow() == N) {
			ArrayList<ArrayList<Integer>> tables = new ArrayList<>();
			boolean[] visited = new boolean[N];
			ArrayDeque<Integer> stack = new ArrayDeque<>();

			for (int i = 0; i < N; i++) if (!visited[i]) {
				visited[i] = true;
				stack.push(i);
				ArrayList<Integer> table = new ArrayList<>();
				while (!stack.isEmpty()) {
					int node = stack.pop();
					table.add(node);
					for (int neigh: edges.get(node)) if (neigh < source && !visited[neigh]) {
						Point p = new Point(node, neigh);
						if ((A[node] % 2 == 0) == (costs.get(p) == 0)) {
							visited[neigh] = true;
							stack.push(neigh);
						}
					}
				}
				tables.add(table);
			}

			out.println(tables.size());
			for (ArrayList<Integer> table: tables) {
				out.print(table.size());
				for (int fox: table) {
					out.printf(" %d", (fox + 1));
				}
				out.println();
			}
		} else {
			out.println("Impossible");
		}
	}

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

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

	private int maxFlow() {
		int res = 0;
		int temp;
		while ((temp = findPath()) > 0) {
			res += temp;
		}
		return res;
	}

	private int findPath() {
		final int N = edges.size();

		int[] flow = new int[N];
		int[] before = new int[N];
		ArrayDeque<Integer> stack = new ArrayDeque<>();

		flow[source] = (int)1e9;
		Arrays.fill(before, -1);
		stack.push(source);

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

		if (flow[sink] == 0) {
			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];
	}

}

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 XMath {

	public static 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;
	}

}