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 E {
    public static void main(String[] args) throws Exception {

        new E().solve();
    }

    void solve() throws IOException {
        FastScanner in = new FastScanner(System.in);

        boolean[] isPrime = new boolean[112345];
        Arrays.fill(isPrime, true);
        for (int p = 2; p < isPrime.length; p++) {
            if (isPrime[p]) {
                for (int k = p + p; k < isPrime.length; k += p) {
                    isPrime[k] = false;
                }
            }
        }


        int n = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }

        int GN = n + 2;
        int S = n;
        int T = n + 1;

        cap = new int[GN][GN];
        nei = new LinkedList[GN];
        for (int i = 0; i < nei.length; i++) {
            nei[i] = new LinkedList<Integer>();
        }
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                // S->
                cnct(S, i, 2);
                for (int jj = 0; jj < n; jj++) {
                    if (isPrime[a[i] + a[jj]]) {
                        cnct(i, jj, 1);
                    }
                }
            } else {
                // ->T
                cnct(i, T, 2);
            }
        }

        int maxFlow = 0;
        while (true) {
            int f = flow(S, T, new boolean[GN], Integer.MAX_VALUE / 2, cap, nei);
            maxFlow += f;
            if (f == 0) {
                break;
            }
        }
        if (maxFlow != n) {
            // ng!
            System.out.println("Impossible");
            return;
        } else {
            // ok

            StringBuilder sb = new StringBuilder();
            LinkedList<Integer> list = new LinkedList<Integer>();
            boolean[] done = new boolean[n];
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                if (!done[i]) {
                    cnt++;
                    list.clear();
                    dfs(i, a[i] % 2 == 0, done, n, list);

                    sb.append(list.size());
                    for (int v : list) {
                        sb.append(" " + (v + 1));
                    }
                    sb.append("\n");
                }
            }
            //
            System.out.println(cnt);
            System.out.print(sb);
        }
    }

    void dfs(int idx, boolean even, boolean[] done, int n, List<Integer> list) {
        done[idx] = true;
        list.add(idx);
        for (int ni = 0; ni < n; ni++) {
            if (!done[ni] && (even ? cap[ni][idx] > 0 : cap[idx][ni] > 0)) {
                dfs(ni, !even, done, n, list);
                return;
            }
        }
    }

    int[][] cap;
    LinkedList<Integer>[] nei;
    void cnct(int a, int b, int v) {
        cap[a][b] = v;
        nei[a].add(b);
        nei[b].add(a);
    }

    int flow(int idx, int T, boolean[] done, int lim, int[][] cap, List<Integer>[] nei) {
        if (!done[idx]) {
            if (idx == T) {
                return lim;
            } else {
                done[idx] = true;
                for (int ni : nei[idx]) {
                    if (cap[idx][ni] > 0) {
                        int f = flow(ni, T, done, Math.min(lim, cap[idx][ni]), cap, nei);
                        if (f > 0) {
                            // ok
                            cap[idx][ni] -= f;
                            cap[ni][idx] += f;
                            return f;
                        }
                    }
                }
                return 0;
            }
        } else {
            return 0;
        }
    }





    class FastScanner {

        private InputStream _stream;
        private byte[] _buf = new byte[1024];
        private int _curChar;
        private int _numChars;
        private StringBuilder _sb = new StringBuilder();

        FastScanner(InputStream stream) {
            this._stream = stream;
        }

        public 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++];
        }

        public String next() {
            int c = read();
            while (isWhitespace(c)) {
                c = read();
            }
            _sb.setLength(0);
            do {
                _sb.appendCodePoint(c);
                c = read();
            } while (!isWhitespace(c));
            return _sb.toString();
        }

        public int nextInt() {
            return (int) nextLong();
        }
        public long nextLong() {
            int c = read();
            while (isWhitespace(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isWhitespace(c));
            return res * sgn;
        }

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

}

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