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.io.*;
import java.util.*;

public class Main {
	void solve() {
		boolean[] prime = new boolean[20000];
		Arrays.fill(prime, true);
		for (int i = 2; i * i < 20000; ++i) {
			if (prime[i]) {
				for (int j = i * i; j < 20000; j += i) {
					prime[j] = false;
				}
			}
		}
		int n = in.nextInt();
		ArrayList<Pair> even = new ArrayList<Pair>();
		ArrayList<Pair> odd = new ArrayList<Pair>();
		for (int i = 0; i < n; ++i) {
			int x = in.nextInt();
			if (x % 2 == 0) {
				even.add(new Pair(x, i));
			} else {
				odd.add(new Pair(x, i));
			}
		}
		if (even.size() != odd.size()) {
			out.println("Impossible");
		} else {
			NetworkFlow net = new NetworkFlow(n + 2, 0, 1);
			for (int i = 0; i < n / 2; ++i) {
				net.addEdge(0, 2 + even.get(i).second, 2);
				net.addEdge(2 + odd.get(i).second, 1, 2);
			}
			for (int i = 0; i < n / 2; ++i) {
				for (int j = 0; j < n / 2; ++j) {
					if (prime[even.get(i).first + odd.get(j).first]) {
						net.addEdge(2 + even.get(i).second, 2 + odd.get(j).second, 1);
					}
				}
			}
			int flow = net.maxFlow();
			if (flow != n) {
				out.println("Impossible");
			} else {
				ArrayList<ArrayList<Integer>> ans = net.getCycles();
				out.println(ans.size());
				for (int i = 0; i < ans.size(); ++i) {
					out.print(ans.get(i).size() + " ");
					for (int j = 0; j < ans.get(i).size(); ++j) {
						out.print(ans.get(i).get(j) - 1 + " ");
					}
					out.println();
				}
			}
		}
	}
	
	public class Pair {
		public int first;
		public int second;
		
		public Pair(int first, int second) {
			this.first = first;
			this.second = second;
		}
	}
	public class NetworkFlow {
		class Edge {
			int to;
			int cap;
			int flow;
			Edge rev;
			
			public Edge(int to, int cap) {
				this.to = to;
				this.cap = cap;
				this.flow = 0;
			}
		}
		
		ArrayList<Edge>[] g;
		int[] q;
		int[] level;
		int[] next;
		boolean[] was;
		int s;
		int t;
		
		public NetworkFlow(int n, int s, int t) {
			g = new ArrayList[n];
			for (int i = 0; i < n; ++i) {
				g[i] = new ArrayList<Edge>();
			}
			q = new int[n];
			level = new int[n];
			next = new int[n];
			was = new boolean[n];
			this.s = s;
			this.t = t;
		}
		
		public ArrayList<ArrayList<Integer>> getCycles() {
			ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();
			Arrays.fill(was, false);
			for (int i = 2; i < g.length; ++i) {
				if (!was[i]) {
					ArrayList<Integer> cycle = new ArrayList<Integer>();
					go(i, cycle);
					res.add(cycle);
				}
			}
			out.println();
			return res;
		}
		
		public void go(int x, ArrayList<Integer> cycle) {
			was[x] = true;
			cycle.add(x);
			for (Edge e : g[x]) {
				if (!was[e.to]) {
					if (e.flow == -1 || e.flow == 1) {
						go(e.to, cycle);
					}
				}
			}
		}
		
		public void addEdge(int from, int to, int cap) {
			Edge e1 = new Edge(to, cap);
			Edge e2 = new Edge(from, 0);
			e1.rev = e2;
			e2.rev = e1;
			g[from].add(e1);
			g[to].add(e2);
		}
		
		public boolean bfs() {
			Arrays.fill(level, -1);
			level[s] = 0;
			q[0] = s;
			for (int qh = 0, qt = 1; qh < qt; ++qh) {
				int from = q[qh];
				for (Edge e : g[from]) {
					if (level[e.to] == -1) {
						if (e.cap > e.flow) {
							level[e.to] = level[from] + 1;
							q[qt++] = e.to;
						}
					}
				}
			}
			return level[t] != -1;
		}
		
		public int dfs(int x, int currentFlow) {
		  if (x == t) {
		    return currentFlow;
		  }
		  while (next[x] < g[x].size()) {
		  	Edge e = g[x].get(next[x]);
		  	if (level[e.to] > level[x]) {
		  		if (e.cap > e.flow) {
		  			int got = dfs(e.to, Math.min(currentFlow, e.cap - e.flow));
		  			if (got > 0) {
		  				e.flow += got;
		  				e.rev.flow -= got;
		  				return got;
		  			}
		  		}
		  	}
		  	++next[x];
		  }
		  return 0;
		}
		
		public int maxFlow() {
			int res = 0;
			while (bfs()) {
				Arrays.fill(next, 0);
				int cur = 0;
				do {
					cur = dfs(s, Integer.MAX_VALUE);
					res += cur;
				} while (cur > 0);
			}
			return res;
		}
	}
	
	void run() {
		in = new InputReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}
	
	public InputReader in;
	public PrintWriter out;
	
	class InputReader {
		public BufferedReader br;
		public StringTokenizer st;
		
		public InputReader(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			st = null;
		}
		
		public boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String line = null;
				try {
					line = br.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				if (line == null) {
					return false;
				}
				st = new StringTokenizer(line);
			}
			return true;
		}
		
		public String next() {
			if (!hasMoreTokens()) {
				return null;
			}
			return st.nextToken();
		}
		
		public int nextInt() {
			return Integer.parseInt(next());
		}
	}
	
	public static void main(String[] args) {
		new Main().run();
	}
}