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;
const int MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const int N = 210, M = 20010, NN = N * N;
struct Edge {
  int to, nxt, w;
} e[NN << 1];
int cnt = 1, lst[N], dep[N], t, prime[M], p[M], tot, a[N], vis[N], n, all;
queue<int> q;
vector<int> cir[N];
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
inline void link(int u, int v, int w) {
  e[++cnt].to = v;
  e[cnt].nxt = lst[u];
  e[cnt].w = w;
  lst[u] = cnt;
  e[++cnt].to = u;
  e[cnt].nxt = lst[v];
  e[cnt].w = 0;
  lst[v] = cnt;
}
inline void find(int x) {
  if (x >= 1 && x <= n) {
    cir[all].push_back(x);
  }
  vis[x] = 1;
  for (int i = lst[x]; i; i = e[i].nxt) {
    if (!vis[e[i].to] && e[i | 1].w == 1) find(e[i].to);
  }
}
inline int bfs() {
  memset(dep, 0, sizeof dep);
  while (!q.empty()) q.pop();
  q.push(0);
  dep[0] = 1;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = lst[x]; i; i = e[i].nxt) {
      if (e[i].w && !dep[e[i].to]) {
        q.push(e[i].to);
        dep[e[i].to] = dep[x] + 1;
        if (e[i].to == t) return 1;
      }
    }
  }
  return 0;
}
inline int dinic(int x, int nowflow) {
  if (x == t) return nowflow;
  int rest = nowflow, k;
  for (int i = lst[x]; i; i = e[i].nxt) {
    if (e[i].w && dep[e[i].to] == dep[x] + 1) {
      k = dinic(e[i].to, min(rest, e[i].w));
      e[i].w -= k;
      e[i ^ 1].w += k;
      rest -= k;
    }
  }
  return nowflow - rest;
}
int main() {
  n = read();
  t = n + 1;
  for (int i = (int)(2); i <= (int)(M - 1); ++i) {
    if (!prime[i]) p[++tot] = i;
    for (int j = 1; j <= tot && i * p[j] < M; ++j) {
      prime[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
  for (int i = (int)(1); i <= (int)(n); ++i) {
    a[i] = read();
    if (a[i] & 1)
      link(0, i, 2);
    else
      link(i, t, 2);
  }
  for (int i = (int)(1); i <= (int)(n); ++i)
    for (int j = (int)(1); j <= (int)(n); ++j) {
      if (!prime[a[i] + a[j]] && (a[i] & 1)) link(i, j, 1);
    }
  int flow = 0, ans = 0;
  while (bfs())
    while (flow = dinic(0, INF)) ans += flow;
  if (ans != n) {
    puts("Impossible");
    return 0;
  }
  for (int i = (int)(1); i <= (int)(n); ++i) {
    if (!vis[i]) {
      ++all;
      find(i);
    }
  }
  printf("%d\n", all);
  for (int i = (int)(1); i <= (int)(all); ++i) {
    printf("%d", cir[i].size());
    for (vector<int>::iterator it = cir[i].begin(); it != cir[i].end(); it++) {
      printf(" %d", *it);
    }
    puts("");
  }
  return 0;
}