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.
#include <bits/stdc++.h>
using namespace std;
int head[2000050], nxt[2000050], to[2000050], cnt = 1, n, flow[2000050];
int dep[1050], Q[1050], a[1050];
int vis[2000050], pri[2000050], pri_cnt, ch[1050][2];
int vec[1050][1050], vsize[1050], inv[1050];
void sieve() {
  int i, j, lim = 15000;
  for (i = 2; i <= lim; i++) {
    if (!vis[i]) {
      pri[++pri_cnt] = i;
    }
    for (j = 1; j <= pri_cnt && i * pri[j] <= lim; j++) {
      vis[i * pri[j]] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
inline void add(int u, int v, int f) {
  to[++cnt] = v;
  nxt[cnt] = head[u];
  head[u] = cnt;
  flow[cnt] = f;
  to[++cnt] = u;
  nxt[cnt] = head[v];
  head[v] = cnt;
  flow[cnt] = 0;
}
bool bfs() {
  int i;
  memset(dep, 0, sizeof(dep));
  int l = 0, r = 0;
  Q[r++] = 1049;
  dep[1049] = 1;
  while (l < r) {
    int x = Q[l++];
    for (i = head[x]; i; i = nxt[i])
      if (flow[i] && !dep[to[i]]) {
        dep[to[i]] = dep[x] + 1;
        if (to[i] == 1048) return 1;
        Q[r++] = to[i];
      }
  }
  return 0;
}
int dfs(int x, int mf) {
  int i, nf = 0;
  if (x == 1048) return mf;
  for (i = head[x]; i; i = nxt[i])
    if (flow[i] && dep[to[i]] == dep[x] + 1) {
      int tmp = dfs(to[i], min(mf - nf, flow[i]));
      if (!tmp) dep[to[i]] = 0;
      nf += tmp;
      flow[i] -= tmp;
      flow[i ^ 1] += tmp;
      if (nf == mf) break;
    }
  return nf;
}
void dinic() {
  while (bfs()) {
    while (dfs(1049, 0x3f3f3f3f) > 0)
      ;
  }
}
bool check(int x) {
  int i;
  for (i = 1; i <= cnt && pri[i] * pri[i] <= x; i++)
    if (x % pri[i] == 0) return 0;
  return 1;
}
int main() {
  sieve();
  scanf("%d", &n);
  int i, j, x;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    if (!(a[i] & 1)) {
      add(1049, i, 2);
      for (j = 1; j <= n; j++)
        if (i != j && (a[j] & 1)) {
          if (check(a[i] + a[j])) add(i, j, 1);
        }
    } else {
      add(i, 1048, 2);
    }
  }
  dinic();
  int ERR = 0;
  for (x = 1; x <= n; x++) {
    if (!(a[x] & 1)) {
      for (i = head[x]; i; i = nxt[i])
        if (to[i] != 1049) {
          if (flow[i] == 0) {
            if (!ch[x][0])
              ch[x][0] = to[i];
            else
              ch[x][1] = to[i];
          }
        }
      if (!ch[x][1]) {
        ERR = 1;
        break;
      }
    } else {
      for (i = head[x]; i; i = nxt[i])
        if (to[i] != 1048) {
          if (flow[i] == 1) {
            if (!ch[x][0])
              ch[x][0] = to[i];
            else
              ch[x][1] = to[i];
          }
        }
      if (!ch[x][1]) {
        ERR = 1;
        break;
      }
    }
  }
  if (ERR) {
    puts("Impossible");
    return 0;
  }
  memset(vis, 0, sizeof(vis));
  int tot = 0;
  for (i = 1; i <= n; i++)
    if (!vis[i]) {
      int tp = 0;
      memset(inv, 0, sizeof(inv));
      vec[++tot][++tp] = i;
      inv[i] = 1;
      for (j = 1;; j++) {
        int p = vec[tot][j];
        inv[p] = 1;
        if (inv[ch[p][0]] && inv[ch[p][1]]) break;
        if (inv[ch[p][0]]) {
          vec[tot][++tp] = ch[p][1];
        } else {
          vec[tot][++tp] = ch[p][0];
        }
      }
      for (j = 1; j <= tp; j++) vis[vec[tot][j]] = 1;
      vsize[tot] = tp;
    }
  printf("%d\n", tot);
  for (i = 1; i <= tot; i++) {
    printf("%d ", vsize[i]);
    for (j = 1; j <= vsize[i]; j++) {
      printf("%d ", vec[i][j]);
    }
    puts("");
  }
}
