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 N = 20010;
const int M = 500010;
const int INF = ~0u >> 2;
template <class T>
struct Max_Flow {
  int s, t, n;
  int Q[N], sign;
  int head[N], level[N], cur[N], pre[N];
  int nxt[M], pnt[M], E;
  T cap[M];
  void Init(int n, int s, int t) {
    this->n = n;
    this->s = s;
    this->t = t;
    E = 0;
    std::fill(head, head + n, -1);
  }
  void Add_edge(int from, int to, T c) {
    pnt[E] = to;
    cap[E] = c;
    nxt[E] = head[from];
    head[from] = E++;
    pnt[E] = from;
    cap[E] = 0;
    nxt[E] = head[to];
    head[to] = E++;
  }
  bool Bfs(int s, int t) {
    sign = t;
    std::fill(level, level + n, -1);
    int *front = Q, *tail = Q;
    *tail++ = t;
    level[t] = 0;
    while (front < tail && level[s] == -1) {
      int u = *front++;
      for (int e = head[u]; e != -1; e = nxt[e]) {
        if (cap[e ^ 1] > 0 && level[pnt[e]] < 0) {
          level[pnt[e]] = level[u] + 1;
          *tail++ = pnt[e];
        }
      }
    }
    return level[s] != -1;
  }
  void Push(int t, T &flow) {
    T mi = INF;
    int p = pre[t];
    for (int p = pre[t]; p != -1; p = pre[pnt[p ^ 1]]) {
      mi = std::min(mi, cap[p]);
    }
    for (int p = pre[t]; p != -1; p = pre[pnt[p ^ 1]]) {
      cap[p] -= mi;
      if (!cap[p]) {
        sign = pnt[p ^ 1];
      }
      cap[p ^ 1] += mi;
    }
    flow += mi;
  }
  void Dfs(int u, int t, T &flow) {
    if (u == t) {
      Push(t, flow);
      return;
    }
    for (int &e = cur[u]; e != -1; e = nxt[e]) {
      if (cap[e] > 0 && level[u] - 1 == level[pnt[e]]) {
        pre[pnt[e]] = e;
        Dfs(pnt[e], t, flow);
        if (level[sign] > level[u]) {
          return;
        }
        sign = t;
      }
    }
  }
  T Dinic() {
    pre[s] = -1;
    T flow = 0;
    while (Bfs(s, t)) {
      std::copy(head, head + n, cur);
      Dfs(s, t, flow);
    }
    return flow;
  }
  void gao() {}
};
Max_Flow<int> *G = new Max_Flow<int>();
bool flag[20010];
void init() {
  for (int i = 2; i <= 20000; i++) {
    for (int j = 2 * i; j <= 20000; j += i) {
      flag[j] = true;
    }
  }
}
vector<int> adj[222];
bool vis[222];
vector<int> v;
void dfs(int u) {
  vis[u] = true;
  v.push_back(u);
  for (int i = 0; i < adj[u].size(); i++) {
    int to = adj[u][i];
    if (!vis[to]) {
      dfs(to);
    }
  }
}
int main() {
  init();
  int n, a[222];
  scanf("%d", &n);
  G->Init(n + 2, 0, n + 1);
  int odd = 0, even = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2 == 0) {
      G->Add_edge(0, i, 2);
      even++;
    } else {
      odd++;
      G->Add_edge(i, n + 1, 2);
    }
    for (int j = 1; j < i; j++) {
      if (!flag[a[i] + a[j]]) {
        if (a[i] % 2 == 0)
          G->Add_edge(i, j, 1);
        else
          G->Add_edge(j, i, 1);
      }
    }
  }
  if (odd != even) {
    puts("Impossible");
    return 0;
  }
  int ret = G->Dinic();
  if (ret != odd * 2) {
    puts("Impossible");
    return 0;
  }
  for (int u = 1; u <= n; u++) {
    if (a[u] % 2 == 0) {
      for (int i = G->head[u]; i != -1; i = G->nxt[i]) {
        int to = G->pnt[i];
        if (to != 0 && G->cap[i] == 0) {
          adj[u].push_back(to);
          adj[to].push_back(u);
        }
      }
    }
  }
  memset(vis, false, sizeof(vis));
  vector<vector<int> > ans;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      v.clear();
      dfs(i);
      ans.push_back(v);
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    printf("%d", ans[i].size());
    for (int j = 0; j < ans[i].size(); j++) {
      printf(" %d", ans[i][j]);
    }
    puts("");
  }
  return 0;
}