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 int source;
	private int sink;
	private ArrayList<ArrayList<Integer>> graph = 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();
		}
		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 (i != j && a[j] % 2 == 1 && isPrime(a[i] + a[j])) {
						addEdge(i, j, 1);
					}
				}
			} else {
				addEdge(i, sink, 2);
			}
		}
		if (maxFlow() == n) {
			boolean[] visited = new boolean[n];
			ArrayList<ArrayDeque<Integer>> tables = new ArrayList<>();
			for (int i = 0; i < n; i++) if (!visited[i]) {
				ArrayDeque<Integer> table = new ArrayDeque<>();
				ArrayDeque<Integer> stack = new ArrayDeque<>();
				visited[i] = true;
				stack.push(i);
				while (!stack.isEmpty()) {
					int node = stack.pop();
					table.push(node);
					for (int child: graph.get(node)) if (child < n && !visited[child]) {
						Point p;
						if (a[node] % 2 == 0) {
							p = new Point(node, child);
						} else {
							p = new Point(child, node);
						}
						if (costs.get(p) == 0) {
							visited[child] = true;
							stack.push(child);
						}
					}
				}
				tables.add(table);
			}
			out.println(tables.size());
			for (ArrayDeque<Integer> table: tables) {
				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 maxFlow() {
		int res = 0;
		int temp;
		while ((temp = findPath()) > 0) {
			res += temp;
		}
		return res;
	}

	private int findPath() {
		final int n = graph.size();
		boolean[] visited = new boolean[n];
		visited[source] = true;
		int[] before = new int[n];
		Arrays.fill(before, -1);
		ArrayDeque<Integer> stack = new ArrayDeque<>();
		stack.push(source);
		while (!stack.isEmpty()) {
			int node = stack.pop();
			for (int child: graph.get(node)) if (!visited[child]) {
				Point p = new Point(node, child);
				if (costs.get(p) == 0) {
					continue;
				}
				visited[child] = true;
				before[child] = node;
				stack.push(child);
				if (child == sink) {
					stack.clear();
					break;
				}
			}
		}
		if (before[sink] == -1) {
			return 0;
		}
		int min = 100;
		int node = sink;
		while (node != source) {
			Point p = new Point(before[node], node);
			min = Math.min(min, costs.get(p));
			node = before[node];
		}
		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) - min);
			costs.put(b, costs.get(b) + min);
			node = before[node];
		}
		return min;
	}

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

	private void addEdge(int u, int v, int c) {
		graph.get(u).add(v);
		graph.get(v).add(u);
		costs.put(new Point(u, v), c);
		costs.put(new Point(v, u), 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();
	}
}