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.*;
public class CF510E_FoxAndDinner {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int size = (int) (10e4*2+10);
		boolean[] primes = new boolean[size];
		Arrays.fill(primes,  true);
		for(int i = 2; i < size; i ++){
			if(!primes[i])continue;
			for(int j = i * 2; j < size; j += i){
				primes[j] = false;
			}
		}
//		for(int i = 0; i < 30; i ++)System.out.print(primes[i] + ", ");
		int[] v = new int[n];
		int ctr = 0;
		for(int i = 0; i < n; i ++){
			v[i] = in.nextInt();
			ctr+=v[i]%2;
		}
		if(ctr != n - ctr){
			System.out.println("Impossible");
			return;
		}
		
		TidalFlow flow = new TidalFlow(n);
		for(int i = 0; i < n; i ++){
			if(v[i] % 2 != 0) continue;
			for(int j = 0; j < n; j ++){
				if(primes[v[i] + v[j]]){
					flow.add(i, j, 1);
				}
			}
		}
		
		//source, sink
		for(int i = 0; i < n; i ++){
			if(v[i] % 2 == 0) flow.add(flow.s, i, 2);
			else flow.add(i, flow.t, 2);
		}
		
//		System.out.println(flow.getFlow());
		ArrayList<Integer>[] adj = new ArrayList[n];
		for(int i = 0; i < n; i ++)adj[i] = new ArrayList<Integer>();
		if(flow.getFlow() != n){
			System.out.println("Impossible");
			return;
		}
		for(ArrayList<TidalFlow.Edge> ee: flow.adj){
			for(TidalFlow.Edge e: ee){
				if(e.i == flow.s || e.j == flow.t)continue;
				if(e.flow == 1){
					adj[e.i].add(e.j);
					adj[e.j].add(e.i);
				}
			}
		}
		
//		for(int i = 0; i < n; i ++)System.out.println(adj[i]);
		boolean[] vis = new boolean[n];
		ArrayList<String> ans = new ArrayList<String>();	
		for(int i = 0; i < n; i ++){
			if(vis[i]) continue;
			int at = i;
			vis[at] = true;
			String add = "" + (i + 1);
			int len = 0;
			while(true){
				len++;
				int to = -1;
				for(int e: adj[at]){
					if(!vis[e]){
						to = e;
					}
				}
				if(to == -1) break;
				vis[to] = true;
				at = 2;
				add += " " + (to + 1);
				at = to;
			}
			add = len + " " + add;
			ans.add(add);
		}
		System.out.println(ans.size());
		for(String e: ans)System.out.println(e);
	}
	 static class TidalFlow {
		   	ArrayDeque<Edge> stk = new ArrayDeque<Edge>();
		   	int N, s, t, oo = 987654321, fptr, bptr;
		   	ArrayList<Edge>[] adj;
		   	int[] q, dist, pool;

		   	@SuppressWarnings("unchecked")
		   	TidalFlow(int NN) {
		       	N=(t=(s=NN)+1)+1;
		       	adj = new ArrayList[N];
		       	for(int i = 0; i < N; adj[i++] = new ArrayList<Edge>());
		       	dist = new int[N];
		       	pool = new int[N];
		       	q = new int[N];
		   	}
		   	void add(int i, int j, int cap) {
		       	Edge fwd = new Edge(i, j, cap, 0);
		       	Edge rev = new Edge(j, i, 0, 0);
		       	adj[i].add(rev.rev=fwd);
		       	adj[j].add(fwd.rev=rev);
		   	}
		   	int augment() {
		       	Arrays.fill(dist, Integer.MAX_VALUE);
		       	pool[t] = dist[s] = fptr = bptr = 0;
		       	pool[q[bptr++] = s] = oo;
		       	while(bptr > fptr && q[fptr] != t)
		           	for(Edge e : adj[q[fptr++]]) {
		               	if(dist[e.i] < dist[e.j])
		                   	pool[e.j] += e.carry = Math.min(e.cap - e.flow, pool[e.i]);
		               	if(dist[e.i] + 1 < dist[e.j] && e.cap > e.flow)
		                   	dist[q[bptr++] = e.j] = dist[e.i] + 1;
		           	}
		       	if(pool[t] == 0) return 0;
		       	Arrays.fill(pool, fptr = bptr = 0);
		       	pool[q[bptr++] = t] = oo;
		       	while(bptr > fptr)
		           	for(Edge e : adj[q[fptr++]]) {
		               	if(pool[e.i] == 0) break;
		               	int f = e.rev.carry = Math.min(pool[e.i], e.rev.carry);
		               	if(dist[e.i] > dist[e.j] && f != 0) {
		                   	if(pool[e.j] == 0) q[bptr++] = e.j;
		                   	pool[e.i] -= f;
		                   	pool[e.j] += f;
		                   	stk.push(e.rev);
		               	}
		           	}
		       	int res = pool[s];
		       	Arrays.fill(pool, 0);
		       	pool[s] = res;
		       	while(stk.size() > 0) {
		           	Edge e = stk.pop();
		           	int f = Math.min(e.carry, pool[e.i]);
		           	pool[e.i] -= f;
		           	pool[e.j] += f;
		           	e.flow += f;
		           	e.rev.flow -= f;
		       	}
		       	return res;
		   	}
		   	int getFlow() {
		       	int res = 0, f = 1;
		       	while(f != 0)
		           	res += f = augment();
		       	return res;
		   	}
		   	class Edge {
		       	int i, j, cap, flow, carry;
		       	Edge rev;
		       	Edge(int ii, int jj, int cc, int ff) {
		           	i=ii; j=jj; cap=cc; flow=ff;
	       	}
	   	}
	}
}