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.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        QuickScanner in = new QuickScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskC {
    boolean adj[][];
    private ArrayList<ArrayList<Integer>> res;
    private int[] used;
    int n;
    public void solve(int testNumber, QuickScanner in, PrintWriter out) {
        n=in.nextInt();
        int a[]=in.nextInts(n);
        int p[]=Sieve.buildSieve(20000);
        adj=new boolean[n][n];
        for(int i=0;i<n;i++)
            for(int j=0;j<n;j++)
                adj[i][j]=(p[a[i]+a[j]]==a[i]+a[j]);
        Flow flow=new Flow(n+2,(n+2)*(n+2));
        int s=n;
        int t=n+1;
        int cnt[]=new int[2];
        for(int i=0;i<n;i++)
            if(a[i]%2==0)
                flow.addEdge(s,i,2);
            else
                flow.addEdge(i,t,2);
        for(int i=0;i<n;i++)
            cnt[a[i]%2]++;
        for(int i=0;i<n;i++)
            for(int j=0;j<n;j++)
                if(a[i]%2==0 && a[j]%2==1 && adj[i][j])
                    flow.addEdge(i,j,1);
        int F=flow.getFlow(s,t);
        if(cnt[0]==cnt[1] && F==2*cnt[0])
        {
            for(int i=0;i<n;i++)
                for(int j=0;j<n;j++)
                    adj[i][j]=false;
            for(int i=1;i<flow.getEdgeCount();i+=2)
            {
                int from,to,cap;
                from=flow.to[i^1];
                to=flow.to[i];
                cap=flow.cap[i];

                if(from<n && to<n && cap>0)
                {
                    //out.println(from+"->"+to);
                    adj[from][to] = adj[to][from] = true;
                }
            }
            used=new int[n];
            res=new ArrayList<ArrayList<Integer> >();
            for(int i=0;i<n;i++)
                if(used[i]==0)
                {
                    res.add(build(i,new ArrayList<Integer>()));

                }
            out.println(res.size());
            for(ArrayList<Integer> lst:res)
            {
                out.print(lst.size());
                for(int j:lst)
                    out.print(" "+(j+1));
                out.println();
            }
        }
        else
            out.println("Impossible");
    }

    private ArrayList<Integer> build(int i, ArrayList<Integer> table)
    {
        used[i]=1;
        table.add(i);
        for(int j=0;j<n;j++)
            if(adj[i][j] && used[j]==0)
            {
                build(j, table);
                break;
            }
        return table;
    }
}

class QuickScanner {
    BufferedReader in;
    StringTokenizer token;
    String delim;
    public QuickScanner(InputStream inputStream)
    {
        this.in=new BufferedReader(new InputStreamReader(inputStream));
        this.delim=" \n\t";
        this.token=new StringTokenizer("",delim);
    }

    public boolean hasNext()
    {
        while(!token.hasMoreTokens())
        {
            try {
                String s=in.readLine();
                if(s==null) return false;
                token=new StringTokenizer(s,delim);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }
        return true;
    }

    public String next()
    {
        hasNext();
        return token.nextToken();
    }

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

    public int[] nextInts(int n)
    {
        int[] res=new int[n];
        for(int i=0;i<n;i++)
            res[i]=nextInt();
        return res;
    }

}

class Sieve
{
    public static int[] buildSieve(int maxV)
    {
        int [] p=new int[maxV+1];
        for(int i=2;i*i<=maxV;i++)
            if(p[i]==0)
                for(int j=i*i;j<=maxV;j+=i)
                    p[j]=i;
        for(int i=2;i<=maxV;i++)
            if(p[i]==0)
                p[i]=i;
        return p;
    }
}

class Flow
{

    public int hd[];
    public int to[], cap[], nxt[];
    boolean used[];

    int ecnt;
    int n;
    int maxE;
    public Flow(int n, int maxE)
    {
        this.n=n;
        this.maxE=maxE;
        hd=new int[n];
        to=new int[maxE*2];
        cap=new int[maxE*2];
        nxt=new int[maxE*2];
        used=new boolean[n];
        reset();
    }
    public void reset()
    {
        for(int i=0;i<n;i++)
            hd[i]=-1;
        ecnt=0;
    }
    public void addEdge(int a, int b, int c)
    {
        to[ecnt]=b;
        nxt[ecnt]=hd[a];
        cap[ecnt]=c;
        hd[a]=ecnt;
        ecnt++;

        to[ecnt]=a;
        nxt[ecnt]=hd[b];
        cap[ecnt]=0;
        hd[b]=ecnt;
        ecnt++;
    }

    public int getFlow(int s, int t)
    {
        int flow=0;
        int c=1<<30;
        while(c>0)
        {
            Arrays.fill(used, false);
            if(dfs(s,t,c))
                flow+=c;
            else
                c/=2;
        }

        return flow;
    }

    private boolean dfs(int s, int t, int c)
    {
        if(s==t) return true;
        if(used[s]) return false;
        used[s]=true;
        for(int i=hd[s];i!=-1;i=nxt[i])
            if(cap[i]>=c && dfs(to[i],t,c))
            {
                cap[i]-=c;
                cap[i^1]+=c;
                return true;
            }
        return false;
    }
    public int getEdgeCount()
    {
        return ecnt;
    }
}