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

	static final int INF = (int) 1e9;
	static int V, s, t, res[][]; // input
	static ArrayList<Integer>[] adjList,g; // input
	static int[] ptr, dist;

	static int dinic() // O(V^2E)
	{
		int mf = 0;
		while (bfs()) {
			ptr = new int[V];
			int f;
			while ((f = dfs(s, INF)) != 0)
				mf += f;
		}
		return mf;
	}

	static boolean bfs() {
		dist = new int[V];
		Arrays.fill(dist, -1);
		dist[s] = 0;
		Queue<Integer> q = new LinkedList<Integer>();
		q.add(s);
		while (!q.isEmpty()) {
			int u = q.remove();
			if (u == t)
				return true;
			for (int v : adjList[u])
				if (dist[v] == -1 && res[u][v] > 0) {
					dist[v] = dist[u] + 1;
					q.add(v);
				}
		}
		return false;
	}

	static int dfs(int u, int flow) {
		if (u == t)
			return flow;
		for (int i = ptr[u]; i < adjList[u].size(); i = ++ptr[u]) {
			int v = adjList[u].get(i);
			if (dist[v] == dist[u] + 1 && res[u][v] > 0) {
				int f = dfs(v, Math.min(flow, res[u][v]));
				if (f > 0) {
					res[u][v] -= f;
					res[v][u] += f;
					return f;
				}
			}
		}
		return 0;

	}

	static ArrayList<Integer> primes;
	static int[] isComposite;

	static void sieve(int N) // O(N log log N)
	{
		isComposite = new int[N + 1];
		isComposite[0] = isComposite[1] = 1; // 0 indicates a prime number
		primes = new ArrayList<Integer>();

		for (int i = 2; i <= N; ++i) // can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) // can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				if (1l * i * i <= N)
					for (int j = i * i; j <= N; j += i) // j = i * 2 will not affect performance too much, may alter in
														// modified sieve
						isComposite[j] = 1;
			}
	}

	/*
	 * 2. Primality Test
	 * 
	 * Preprocessing: call sieve with sqrt(N), O(sqrt(N) log log sqrt(N)) Query:
	 * best case O(1), worst case O(sqrt(N) / log sqrt(N))
	 */
	static boolean isPrime(int N) {
		if (N < isComposite.length)
			return isComposite[N] == 0;
		for (int p : primes) // may stop if p * p > N
			if (N % p == 0)
				return false;
		return true;
	}

	static boolean vis[];
	
	static void dfs(int u,ArrayList<Integer> x) {
		vis[u]=true;
		x.add(u);
		for(int v:g[u]) {
			if(v<V-2&&!vis[v] ) {
				dfs(v, x);
			}
		}
	}

	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);

		int TC = 1;
		// TC=sc.nextInt();
		while (TC-- > 0) {
			int n = sc.nextInt();
			int a[] = sc.intArr(n);
			V = n + 2;
			s = n;
			t = n + 1;
			int even = 0;
			for (int x : a)
				if (x % 2 == 0)
					even++;

			if (even != (n - even)) {
				pw.println("Impossible");
				continue;
			}
			sieve(1000000);

			adjList = new ArrayList[V];
			for (int i = 0; i < V; i++) {
				adjList[i] = new ArrayList<>();
			}

	        g = new ArrayList[n]; Arrays.setAll(g, i -> new ArrayList<>());
			res = new int[n + 2][n + 2];
			for (int i = 0; i < a.length; i++) {
				for (int j = i + 1; j < a.length; j++) {
					if (isPrime(a[i] + a[j])) {
						int u = i;
						int v = j;
						if (a[i] % 2 == 0) {
							u = j;
							v = i;
						}
						adjList[s].add(u);
						adjList[v].add(t);
						res[s][u] = 2;
						res[v][t] = 2;
						adjList[u].add(v);
						adjList[v].add(u);
						res[u][v] = 1;
					}
				}
			}
			vis=new boolean[n];
			if (dinic() != n) {
				pw.println("Impossible");
				continue;
			}
			
			ArrayList<ArrayList<Integer>> ans=new ArrayList<>();
			
			for (int i = 0; i < a.length; i++) {
				for (int j = 0; j < a.length; j++) {
					int u = i;
					int v = j;
					if (a[i] % 2 == 0) {
						u = j;
						v = i;
					}
					if(u!=v&&(res[u][v]==0&&isPrime(a[u]+a[v])))
					{
						g[i].add(j);
						g[j].add(i);
					}
				}
			}
		/*	System.out.println(res[0][1]);
			for (int i = 0; i < a.length; i++) {
				System.out.println(g[i]);
			}*/
			for (int i = 0; i < a.length; i++) {
				ArrayList<Integer> x=new ArrayList<>();
				if(!vis[i]) {
					dfs(i, x);
					ans.add(x);
				}
			}
			
			pw.println(ans.size());
			for(ArrayList<Integer> x:ans) {
				pw.print(x.size()+" ");
				for(int u:x)
					pw.print(u+1+" ");
				pw.println();
			}

		}
		pw.flush();
	}

	///////////////////////////////////////////////////////////////////////////////////////////

	static class tri {
		int x, y, z;

		public tri(int x, int y, int z) {
			this.x = x;
			this.y = y;
			this.z = z;
		}

	}

	static class pair implements Comparable<pair> {
		int x, y;
		boolean w, l;
		PriorityQueue<Long> pq;

		public pair(boolean a, boolean b) {
			w = a;
			l = b;
		}

		pair(int s, int d) {
			x = s;
			y = d;
		}

		@Override
		public int compareTo(pair p) {
			return Long.compare(x, p.x);
		}

		@Override
		public String toString() {
			return x + " " + y;

		}

	}

	static long mod(long ans, int mod) {
		return (ans % mod + mod) % mod;
	}

	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	public static int log(int n, int base) {
		int ans = 0;
		while (n + 1 > base) {
			ans++;
			n /= base;
		}
		return ans;
	}

	static long pow(long b, long e) {
		long ans = 1;
		while (e > 0) {
			if ((e & 1) == 1)
				ans = ((ans * 1l * b));
			e >>= 1;
			{

			}
			b = ((b * 1l * b));
		}
		return ans;
	}

	static long powmod(long r, long e, int mod) {
		long ans = 1;
		r %= mod;
		while (e > 0) {
			if ((e & 1) == 1)
				ans = (int) ((ans * 1l * r) % mod);
			e >>= 1;
			r = (int) ((r * 1l * r) % mod);
		}
		return ans;
	}

	static int ceil(int a, int b) {
		int ans = a / b;
		return a % b == 0 ? ans : ans + 1;
	}

	static long ceil(long a, long b) {
		long ans = a / b;
		return a % b == 0 ? ans : ans + 1;
	}

	static HashMap<Integer, Integer> compress(int a[]) {
		TreeSet<Integer> ts = new TreeSet<>();
		HashMap<Integer, Integer> hm = new HashMap<>();
		for (int x : a)
			ts.add(x);
		for (int x : ts) {
			hm.put(x, hm.size() + 1);
		}
		return hm;
	}

	// Returns nCr % p
	static int C[];

	static int nCrModp(int n, int r, int p) {
		if (r > n - r)
			r = n - r;
		if (C[r] != 0)
			return C[r];
		// The array C is going to store last
		// row of pascal triangle at the end.
		// And last entry of last row is nCr

		C[0] = 1; // Top row of Pascal Triangle

		// One by constructs remaining rows of Pascal
		// Triangle from top to bottom
		for (int i = 1; i <= n; i++) {

			// Fill entries of current row using previous
			// row values
			for (int j = Math.min(i, r); j > 0; j--)

				// nCj = (n-1)Cj + (n-1)C(j-1);
				C[j] = (C[j] + C[j - 1]) % p;
		}
		return C[r];
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public int[] intArr(int n) throws IOException {
			int a[] = new int[n];
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public long[] longArr(int n) throws IOException {
			long a[] = new long[n];
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

	public static void shuffle(int[] times2) {
		int n = times2.length;
		for (int i = 0; i < n; i++) {
			int r = i + (int) (Math.random() * (n - i));
			int tmp = times2[i];
			times2[i] = times2[r];
			times2[r] = tmp;
		}
	}

}