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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXMFN = 200 + 2;
const int MAXMFM = 2 * (100 * 100 + 200);
typedef struct MF {
  int n, m;
  int fst[MAXMFN];
  int nxt[MAXMFM];
  int to[MAXMFM];
  int cap[MAXMFM];
  bool been[MAXMFN];
  int back[MAXMFN];
  int q[MAXMFN], qhead, qtail;
  void init(int _n) {
    n = _n;
    m = 0;
    for (int i = (0); i < (n); ++i) fst[i] = -1;
  }
  void addedge(int a, int b, int c) {
    nxt[m] = fst[a];
    fst[a] = m;
    to[m] = b;
    cap[m] = c;
    ++m;
    nxt[m] = fst[b];
    fst[b] = m;
    to[m] = a;
    cap[m] = 0;
    ++m;
  }
  int calc(int s, int t) {
    int ret = 0;
    while (true) {
      for (int i = (0); i < (n); ++i) been[i] = false;
      qhead = qtail = 0;
      q[qhead++] = s;
      back[s] = -1;
      been[s] = true;
      while (qtail < qhead) {
        int at = q[qtail++];
        for (int x = fst[at]; x != -1; x = nxt[x])
          if (!been[to[x]] && cap[x] > 0) {
            q[qhead++] = to[x];
            back[to[x]] = x ^ 1;
            been[to[x]] = true;
          }
      }
      if (!been[t]) return ret;
      ++ret;
      for (int u = t; u != s; u = to[back[u]]) {
        ++cap[back[u]];
        --cap[back[u] ^ 1];
      }
    }
  }
} MF;
MF mf;
const int MAXSUM = 20000;
bool isp[MAXSUM + 1];
int n;
int x[200];
bool done[200];
int nret;
int retfst[200];
int retnxt[200];
int retcnt[200];
void run() {
  for (int i = (0); i <= (MAXSUM); ++i) isp[i] = true;
  isp[0] = isp[1] = false;
  for (int i = (2); i <= (MAXSUM); ++i)
    if (isp[i]) {
      for (int j = i + i; j <= MAXSUM; j += i) isp[j] = false;
    }
  scanf("%d", &n);
  for (int i = (0); i < (n); ++i) scanf("%d", &x[i]);
  mf.init(n + 2);
  for (int i = (0); i < (n); ++i)
    if (x[i] % 2 == 0)
      mf.addedge(n, i, 2);
    else
      mf.addedge(i, n + 1, 2);
  for (int i = (0); i < (n); ++i)
    if (x[i] % 2 == 0)
      for (int j = (0); j < (n); ++j)
        if (x[j] % 2 == 1 && isp[x[i] + x[j]]) mf.addedge(i, j, 1);
  int res = mf.calc(n, n + 1);
  if (res != n) {
    printf("Impossible\n");
    return;
  }
  for (int i = (0); i < (n); ++i) done[i] = false;
  nret = 0;
  for (int i = (0); i < (n); ++i)
    if (x[i] % 2 == 0 && !done[i]) {
      int at = i;
      retcnt[nret] = 0;
      retfst[nret] = -1;
      while (true) {
        int to1 = -1, to2 = -2;
        for (int x = mf.fst[at]; x != -1; x = mf.nxt[x])
          if (mf.to[x] != n && mf.cap[x] == 0 && !done[mf.to[x]]) {
            for (int y = mf.fst[mf.to[x]]; y != -1; y = mf.nxt[y])
              if (mf.to[y] != n + 1 && mf.cap[y] == 1 && mf.to[y] != at) {
                to1 = mf.to[x];
                to2 = mf.to[y];
                break;
              }
            break;
          }
        assert(to1 != -1 && to2 != -1);
        done[to1] = done[to2] = true;
        retnxt[to1] = retfst[nret];
        retfst[nret] = to1;
        ++retcnt[nret];
        retnxt[to2] = retfst[nret];
        retfst[nret] = to2;
        ++retcnt[nret];
        if (to2 == i) break;
        at = to2;
      }
      ++nret;
    }
  printf("%d\n", nret);
  for (int i = (0); i < (nret); ++i) {
    printf("%d", retcnt[i]);
    for (int x = retfst[i]; x != -1; x = retnxt[x]) printf(" %d", x + 1);
    puts("");
  }
}
int main() {
  run();
  return 0;
}