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 MAXN = 100005;
const int MAXM = 100005;
const int inf = 0X3F3F3F3F;
const long long INF = 1e17;
long long Ans;
int N, S, T, top = 1;
int dep[MAXN], vis[MAXN];
int head[MAXN], cur[MAXN];
struct Node {
  int v, next;
  long long val;
} node[MAXM];
void Addedge(int u, int v, long long val) {
  node[++top].v = v;
  node[top].val = val;
  node[top].next = head[u];
  head[u] = top;
}
int bfs(int u, int v) {
  queue<int> Q;
  while (!Q.empty()) Q.pop();
  for (int i = S; i <= T; i++) cur[i] = head[i], dep[i] = inf, vis[i] = 0;
  Q.push(u);
  dep[u] = v;
  vis[u] = 1;
  while (!Q.empty()) {
    u = Q.front();
    Q.pop();
    vis[u] = 0;
    for (int i = head[u]; i; i = node[i].next) {
      v = node[i].v;
      if (dep[v] > dep[u] + 1 && node[i].val) {
        dep[v] = dep[u] + 1;
        if (!vis[v]) {
          Q.push(v);
          vis[v] = 1;
        }
      }
    }
  }
  if (dep[T] == inf) return 0;
  return 1;
}
long long dfs(int u, long long flow) {
  long long rlow = 0, used = 0;
  if (u == T) {
    Ans += flow;
    return flow;
  }
  for (int i = cur[u]; i; i = node[i].next) {
    int v = node[i].v;
    cur[u] = i;
    if (node[i].val && dep[v] == dep[u] + 1)
      if (rlow = dfs(v, min(flow - used, node[i].val))) {
        used += rlow;
        node[i].val -= rlow;
        node[i ^ 1].val += rlow;
        if (used == flow) break;
      }
  }
  return used;
}
void Dinic() {
  while (bfs(S, 0)) dfs(S, INF);
}
int a[MAXN], prime[MAXN], pcnt, vip[MAXN];
int Fa[MAXN], M, viss[MAXN], visss[MAXN];
int Find(int x) {
  if (x == Fa[x]) return x;
  return Fa[x] = Find(Fa[x]);
}
void Print(int x) {
  if (!visss[x]) {
    visss[x] = 1;
    printf(" %d", x);
  }
  for (int i = head[x]; i; i = node[i].next)
    if (!visss[node[i].v] && 1 <= node[i].v && node[i].v <= N &&
        Find(x) == Find(node[i].v))
      if ((a[x] % 2 == 0 && node[i].val == 0) || (a[x] % 2 && node[i].val))
        Print(node[i].v);
}
int main() {
  vip[0] = vip[1] = 1;
  for (int i = 2; i <= 20000; i++) {
    if (!vip[i]) prime[++pcnt] = i;
    for (int j = 1; j <= pcnt && i * prime[j] <= 20000; j++) {
      vip[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
  scanf("%d", &N);
  S = 0, T = N + 1;
  for (int i = 1; i <= N; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= N; i++)
    if (a[i] % 2 == 0) {
      Addedge(S, i, 2);
      Addedge(i, S, 0);
    }
  for (int i = 1; i <= N; i++)
    if (a[i] % 2 == 0)
      for (int j = 1; j <= N; j++)
        if (a[j] % 2)
          if (!vip[a[i] + a[j]]) {
            Addedge(i, j, 1);
            Addedge(j, i, 0);
          }
  for (int i = 1; i <= N; i++)
    if (a[i] % 2) {
      Addedge(i, T, 2);
      Addedge(T, i, 0);
    }
  Dinic();
  if (Ans != N) {
    printf("Impossible\n");
    return 0;
  }
  for (int i = 1; i <= N; i++) Fa[i] = i;
  for (int i = 1; i <= N; i++)
    if (a[i] % 2 == 0) {
      for (int j = head[i]; j; j = node[j].next) {
        int v = node[j].v;
        if (node[j].val == 0 && v != 0) {
          int fax = Find(i);
          int fay = Find(v);
          Fa[fay] = fax;
        }
      }
    }
  for (int i = 1; i <= N; i++) {
    int f = Find(i);
    if (!viss[f]) {
      viss[f] = 1;
      M++;
    }
  }
  printf("%d\n", M);
  memset(viss, 0, sizeof(viss));
  for (int i = 1; i <= N; i++) {
    int f = Find(i);
    if (!viss[f]) {
      int cntk = 0;
      for (int j = 1; j <= N; j++)
        if (Find(j) == f) cntk++;
      printf("%d", cntk);
      Print(f);
      viss[f] = 1;
      puts("");
    }
  }
}