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 Fox {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.flush();out.close();
    }
        static class TaskE {
          int n,a[],MAX=40010,S,T,N=210;
          boolean prime[]=new boolean[MAX],inside[]=new boolean[N];
          int rc[][]=new int[N][N],exc[]=new int[N],H[]=new int[N];
          ArrayDeque<Integer> ad=new ArrayDeque<>();
          
          void seive(){
           for(int i=2;i<MAX;i++){
            for(int j=2*i;j<MAX;j+=i){
             prime[j]=true;
            }
           }
          }
          void pr(){
           while(!ad.isEmpty()){
//            System.out.println(ad);
            int node=ad.getFirst();
            int min=Integer.MAX_VALUE;;
            for(int v=0;v<N&&exc[node]!=0;v++){
             if(!mat[node][v])continue;
             if(rc[node][v]>0){
              if(H[v]<H[node]){
               int flow=Math.min(rc[node][v],exc[node]);
                rc[node][v]-=flow;
                rc[v][node]+=flow;
                exc[node]-=flow;
                exc[v]+=flow;
               if(!inside[v]&&v!=S&&v!=T&&exc[v]>0){
                inside[v]=true;ad.addLast(v);
               }
              }else{
               min=Math.min(min,H[v]);
              }
             }
            }
            if(exc[node]==0){
             inside[node]=false;ad.pollFirst();
            }else{
             H[node]=min+1;
            }
           } 
          }
          int V[][]=new int[N][],from[]=new int[2*N],to[]=new int[2*N],c[]=new int[N],O=0,E=0;
          ArrayList<ArrayList<Integer>>ans=new ArrayList<>();
          ArrayList<Integer> al;
          boolean found;
          void dfs(int u,int pa){
           inside[u]=true;al.add(u);
           for(int v:V[u]){
            if(v==pa)continue;
            if(inside[v]){
             found=true;return;
            }
            dfs(v,u);
            if(found)return;
           }
          }
          public void solve(int testNumber, InputReader in, PrintWriter out) {
              seive();
              n=in.nextInt();
              a=new int[n+1];
              for(int i=1;i<=n;i++)a[i]=in.nextInt();
              S=0;T=n+1;H[S]=n+10;
              make(n,in);
              pr();
              if(exc[T]!=2*O||E!=O){
               out.print("Impossible");return;
              }
              int edge=0;
               for(int i=1;i<n;i++){
                for(int j=i+1;j<=n;j++){
                 if(!prime[a[i]+a[j]]&&((a[i]%2==0&&rc[i][j]==0)||(a[i]%2!=0&&rc[j][i]==0))){
                  from[edge]=i;to[edge++]=j;
                  c[i]++;c[j]++;
                 }
                }
               }
               for(int i=1;i<=n;i++){
                V[i]=new int[c[i]];c[i]=0;
               }
               for(int i=0;i<edge;i++){
                V[from[i]][c[from[i]]++]=to[i];
                V[to[i]][c[to[i]]++]=from[i];
               }
               Arrays.fill(inside,false);
               for(int i=1;i<=n;i++){
                if(inside[i])continue;
                al=new ArrayList<>();
                found=false;
                dfs(i,i);
                ans.add(al);
               }
               out.println(ans.size());
               for(int i=0;i<ans.size();i++){
                ArrayList<Integer> part=ans.get(i);
                out.print(part.size()+" ");
                for(int j=0;j<part.size();j++)out.print(part.get(j)+" ");
                out.println();
               }
          }
                  boolean mat[][]=new boolean[N][N];
                  void make(int n,InputReader in){
                   for(int i=1;i<n;i++){
                    for(int j=i+1;j<=n;j++){
                     if(!prime[a[i]+a[j]]){
                      if(a[i]%2==0)rc[i][j]=1;
                      else rc[j][i]=1;
                      mat[i][j]=true;mat[j][i]=true;
                     }
                    }
                   }
                   for(int i=1;i<=n;i++){
                    if(a[i]%2==0){
                     mat[0][i]=true;mat[i][0]=true;
                     exc[i]=2;rc[i][0]=2;
                     ad.add(i);inside[i]=true;++E;
                    }else{
                     mat[i][T]=true;
                     rc[i][T]=2;++O;
                    }
                   }
                  }
//            int[] radixSort(int[] f){ return radixSort(f, f.length); }
//    	int[] radixSort(int[] f, int n)
//    	{
//    		int[] to = new int[n];
//    		{
//    			int[] b = new int[65537];
//    			for(int i = 0;i < n;i++)b[1+(f[i]&0xffff)]++;
//    			for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
//    			for(int i = 0;i < n;i++){
//                             to[b[f[i]&0xffff]++] = f[i];
//                            }
//    			int[] d = f; f = to;to = d;
//    		}
//    		{
//    			int[] b = new int[65537];
//    			for(int i = 0;i < n;i++)b[1+(f[i]>>>16)]++;
//    			for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
//    			for(int i = 0;i < n;i++)to[b[f[i]>>>16]++] = f[i];
//    			int[] d = f; f = to;to = d;
//    		}
//    		return f;
//    	}
    
       }
 
        
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
            st = null;
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}