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

public class C
{
   public static void main(String[] args)
   {
      PrintWriter out = new PrintWriter(System.out);
      new C(new FastScanner(), out);
      out.close();
   }

   boolean[] isPrime;
   void genPrimes(int n)
   {
      isPrime = new boolean[n+1];
      Arrays.fill(isPrime, true);
      isPrime[0] = isPrime[1] = false;
      for (int i=0; i<=n; i++)
         if (isPrime[i]){
            if (i*1L*i <= n) for (int j=i*i; j<=n; j+=i)
               isPrime[j] = false;
         }
   }

   public C(FastScanner in, PrintWriter out)
   {
      genPrimes(40_000);
      int N = in.nextInt();
      int[] vs = new int[N];
      for (int i=0; i<N; i++)
         vs[i] = in.nextInt();

      FordFulkerson mf = new FordFulkerson(N);
      for (int i=0; i<N; i++)
      {
         if (vs[i] % 2 == 0)
         {
            mf.add(mf.s, i, 2);
            for (int j=0; j<N; j++)
               if (isPrime[vs[i]+vs[j]])
               {
                  mf.add(i, j, 1);
               }
         }
         else
            mf.add(i, mf.t, 2);
      }

      int rr = mf.getFlow();
      if (rr != N)
         out.println("Impossible");
      else
      {
         ArrayList<Integer>[] adj = new ArrayList[N];
         for (int i=0; i<N; i++)
            adj[i] = new ArrayList<>();
      
         for (int i=0; i<N; i++) if (vs[i] % 2 == 0) for (int j=0; j<N; j++) if (mf.c[j][i] == 1)
         {
            adj[i].add(j);
            adj[j].add(i);
         }
      
         ArrayList<String> res = new ArrayList<>();
         boolean[] seen = new boolean[N];
         for (int i=0; i<N; i++) if (!seen[i])
         {
            ArrayList<Integer> cycle = new ArrayList<>();
            int last = -1;
            int cur = i;
            while (!seen[cur])
            {
               seen[cur] = true;
               cycle.add(cur);
               for (int j : adj[cur]) if (j != last)
               {
                  last = cur;
                  cur = j;
                  break;
               }
            }

            StringBuilder sb = new StringBuilder();
            sb.append(cycle.size());
            for (int v : cycle)
            {
               sb.append(' ');
               sb.append(v+1);
            }
            res.add(sb.toString());
         }

         out.println(res.size());
         for (String s : res)
            out.println(s);
      }
   }
}

class FordFulkerson {
	int n,s,t,oo=(int)1e9;
	int[][] c;
	boolean[] v;
	FordFulkerson(int nn) { 
		n=(s=(t=nn)+1)+1;
		c = new int[n][n];
		v = new boolean[n];
	}
	void add(int u, int v, int x) {
		c[u][v] += x;
	}
	int getFlow() {
		int ret=0,flow=1;
		while(flow != 0) {
			Arrays.fill(v,false);
			ret += (flow=dfs(s,oo));
		}
		return ret;
	}
	int dfs(int x, int m) {
		if(x==t) return m;
		v[x] = true;
		for(int ret,i=0; i<n; i++)
			if(!v[i] && c[x][i] != 0) 
				if((ret = dfs(i,Math.min(m,c[x][i]))) != 0) {
					c[i][x] += ret;
					c[x][i] -= ret;
					return ret;
				}
		return 0;
	}
}

class FastScanner{
   private InputStream stream;
   private byte[] buf = new byte[1024];
   private int curChar;
   private int numChars;

   public FastScanner()
   {
      stream = System.in;
   }

   int read()
   {
      if (numChars == -1)
         throw new InputMismatchException();
      if (curChar >= numChars){
         curChar = 0;
         try{
            numChars = stream.read(buf);
         } catch (IOException e) {
            throw new InputMismatchException();
         }
         if (numChars <= 0)
            return -1;
      }
      return buf[curChar++];
   }

   boolean isSpaceChar(int c)
   {
      return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
   }
   
   boolean isEndline(int c)
   {
      return c=='\n'||c=='\r'||c==-1;
   }

   int nextInt()
   {
      return Integer.parseInt(next());
   }
   
   long nextLong()
   {
      return Long.parseLong(next());
   }

   double nextDouble()
   {
      return Double.parseDouble(next());
   }

   String next(){
      int c = read();
      while (isSpaceChar(c))
         c = read();
      StringBuilder res = new StringBuilder();
      do{
         res.appendCodePoint(c);
         c = read();
      }while(!isSpaceChar(c));
      return res.toString();
   }
   
   String nextLine(){
      int c = read();
      while (isEndline(c))
         c = read();
      StringBuilder res = new StringBuilder();
      do{
         res.appendCodePoint(c);
         c = read();
      }while(!isEndline(c));
      return res.toString();
   }
}