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.math.BigInteger;
import java.util.*;
public class CF_510E {
    public static void main(String[] args) throws IOException {
        new CF_510E().solve();
    }
    
    int[] findPath(int[][]resid, int src, int sink){
        int[] from=new int[resid.length];
        Arrays.fill(from, -1);
        boolean[] visited=new boolean[resid.length];
        ArrayDeque<Integer> q=new ArrayDeque<>();
        q.add(src);
        visited[src]=true;
        while (!q.isEmpty()){
            int where=q.pollFirst();
            for (int to=0;to<resid.length;to++)
                if (resid[where][to]>0 && !visited[to]){
                    from[to]=where;
                    visited[to]=true;
                    q.add(to);                    
                }
        }
        if (from[sink]==-1) return null;
        return from;
    }
    int pathBreadth(int[][] resid, int src, int sink, int[] from){
        if (from==null) return 0;
        int size=-1;//2 max flow along path
        
        for (int where=sink;where!=src;where=from[where]){
            int val=resid[from[where]][where];
            size= size<0? val : Math.min(val, size);        
        }
        return size;
    }
    
    int maxFlow(int[][] resid, int src, int sink){
        int[][] inv=new int[resid.length][resid.length];
        int[] from;
        int flowSize=0;
//        System.out.println(Arrays.deepToString(resid));


        
        while ((from=findPath(resid, src, sink))!=null){
            int pathSize=pathBreadth(resid, src, sink, from);
            flowSize+=pathSize;
            for (int where=sink; where!=src;where=from[where]){
                resid[where][from[where]]+=pathSize;
                resid[from[where]][where]-=pathSize;            
            }
        }
//        System.out.println(Arrays.deepToString(resid));
//        System.out.println(flowSize);
        return flowSize;
    }
    
    
    
    ArrayList<ArrayList<Integer>> position(int[][] resid){
        int n=resid.length-2;
        boolean[] visited=new boolean[n];
        ArrayList<ArrayList<Integer>> res=new ArrayList<ArrayList<Integer>>();
        for (int i=0;i<n;i++){
            if (visited[i]) continue;
            ArrayList<Integer> curr=new ArrayList<Integer>();            
            int pos=i;
            do{
                visited[pos]=true;
                curr.add(pos);
                if (pos<n/2){
                    for (int j=n/2;j<n;j++)
                        if(resid[j][pos]==1 && !visited[j]){
                            pos=j;
                            break;
                        } 
                }
                else{
                    for (int j=0;j<n/2;j++)
                        if(resid[pos][j]==1 && !visited[j]){
                            pos=j;
                            break;
                        }
                }
            }while (!visited[pos]);
            res.add(curr);
        }          
        
        return res;
    }

    boolean isPrime(int n){
        for (int i=2;i*i<=n;i++)
            if (n%i==0) return false;
        return true;
    }
    
    
    
    void solve() throws IOException{
        
        InputStream in = System.in;
        PrintStream out = System.out;

//        in = new FileInputStream("in.txt");
//        out = new PrintStream("out.txt");

        String impossible="Impossible";
        
        Scanner sc=new Scanner(in);        
        int n=sc.nextInt();
        int[] a=new int[n];
        ArrayList<Integer> even=new ArrayList<Integer>(),
                            odd=new ArrayList<Integer>();
        int[] oldIndex=new int[2*n];
        
        for (int i=0;i<n;i++){
            int val=a[i]=sc.nextInt();
            if (val%2==0) {
                even.add(val);
                oldIndex[even.size()-1]=i;
            }
            else {
                odd.add(val);
                oldIndex[n/2+odd.size()-1]=i;
            }
        }
        if (even.size()!=odd.size()) {
            out.println(impossible);
            return;
        }
        int[][] graph=new int[n+2][n+2];
        int src=graph.length-2, sink=graph.length-1;
        for (int i=0;i<n/2;i++)
            graph[src][i]=2;        
        for (int i=0;i<n/2;i++)
            graph[n/2+i][sink]=2;
        
        for (int i=0;i<n/2;i++)
            for (int j=0;j<n/2;j++){
              //  if ((new BigInteger((even.get(i)+odd.get(j))+"")).isProbablePrime(1))
                  if (isPrime(even.get(i)+odd.get(j)))
                      graph[i][n/2+j]=1;
            }
        
        
        
        
        int res=maxFlow(graph, src, sink);
        if (res<n){
            out.println(impossible);
            return;
        }
        ArrayList<ArrayList<Integer>> ans=position(graph);
        out.println(ans.size());
        


        for (ArrayList<Integer> al:ans){
            out.print(al.size()+" ");
            for (int i=0;i<al.size();i++){
                int val=al.get(i);
                out.print((oldIndex[val]+1)+" ");                
            }              
            out.println();
        }
        
    }
}