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 INF = 200000000;
const int MAXN = 900;
const int MAXM = 100000;
int N, edges;
int last[MAXN], preve[MAXM], head[MAXM];
int Cap[MAXM], Flow[MAXM];
int dist[MAXN];
vector<pair<int, int> > vc[MAXM];
int nextEdge[MAXN];
vector<int> nw[MAXM], rek[MAXM], ac, rep[MAXM];
int ara[900], vis[300];
queue<int> Q;
void init(int N) {
  edges = 0;
  memset(last, -1, sizeof(last));
}
inline void addEdge(int u, int v, int cap, int flow) {
  vc[edges].push_back((make_pair(u, v)));
  head[edges] = v;
  preve[edges] = last[u];
  Cap[edges] = cap;
  Flow[edges] = flow;
  last[u] = edges++;
  head[edges] = u;
  preve[edges] = last[v];
  Cap[edges] = 0;
  Flow[edges] = 0;
  last[v] = edges++;
}
inline bool dinicBfs(int S, int E, int N) {
  int from = S, to, cap, flow;
  memset(dist, 0, sizeof(int) * N);
  dist[from] = 1;
  while (!Q.empty()) Q.pop();
  Q.push(from);
  while (!Q.empty()) {
    from = Q.front();
    Q.pop();
    for (int e = last[from]; e >= 0; e = preve[e]) {
      to = head[e];
      cap = Cap[e];
      flow = Flow[e];
      if (!dist[to] && cap > flow) {
        dist[to] = dist[from] + 1;
        Q.push(to);
        if (to == E) return true;
      }
    }
  }
  return (dist[E] != 0);
}
inline int dfs(int from, int minEdge, int E) {
  if (!minEdge) return 0;
  if (from == E) return minEdge;
  int to, e, cap, flow, ret;
  for (; nextEdge[from] >= 0; nextEdge[from] = preve[e]) {
    e = nextEdge[from];
    to = head[e];
    cap = Cap[e];
    flow = Flow[e];
    if (dist[to] != dist[from] + 1) continue;
    ret = dfs(to, min(minEdge, cap - flow), E);
    if (ret) {
      Flow[e] += ret;
      Flow[e ^ 1] -= ret;
      return ret;
    }
  }
  return 0;
}
int dinicUpdate(int S, int E) {
  int flow = 0;
  while (int minEdge = dfs(S, INF, E)) {
    if (minEdge == 0) break;
    flow += minEdge;
  }
  return flow;
}
int maxFlow(int S, int E, int N) {
  int totFlow = 0;
  while (dinicBfs(S, E, N)) {
    for (int i = 0; i <= N; i++) nextEdge[i] = last[i];
    totFlow += dinicUpdate(S, E);
  }
  return totFlow;
}
int pr[30000 + 5];
void seive() {
  for (int i = 2; i <= 30000; i += 1) {
    if (pr[i]) continue;
    for (int j = i + i; j <= 30000; j += i) pr[j] = 1;
  }
}
vector<int> odd, even;
void dfs(int v) {
  vis[v] = 1;
  ac.push_back((v));
  for (int i = 0; i < nw[v].size(); i++) {
    int w = nw[v][i];
    if (vis[w]) continue;
    dfs(w);
  }
}
int in[300];
int main() {
  seive();
  int i, j, k, n, l, test, casio = 1;
  scanf("%d", &n);
  memset(last, -1, sizeof last);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ara[i]);
    rek[ara[i] & 1].push_back((i));
  }
  for (int i = 0; i < rek[0].size(); i++) {
    for (int j = 0; j < rek[1].size(); j++) {
      int p = ara[rek[0][i]] + ara[rek[1][j]];
      if (pr[p]) continue;
      addEdge(rek[0][i], rek[1][j], 1, 0);
    }
  }
  for (int i = 0; i < rek[0].size(); i++) {
    addEdge(0, rek[0][i], 2, 0);
  }
  for (int i = 0; i < rek[1].size(); i++) {
    addEdge(rek[1][i], n + 1, 2, 0);
  }
  maxFlow(0, n + 1, n + 2);
  for (int i = 0; i < edges; i += 2) {
    if (Flow[i] == 1) {
      k = vc[i][0].first;
      l = vc[i][0].second;
      if (l == 0 || l > n || k == 0 || k > n) continue;
      in[l]++;
      in[k]++;
      nw[k].push_back((l));
      nw[l].push_back((k));
    }
  }
  for (int i = 1; i <= n; i++) {
    if (in[i] < 2) {
      printf("Impossible\n");
      return 0;
    }
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    ac.clear();
    dfs(i);
    if (ac.size() <= 2) {
      printf("Impossible\n");
      return 0;
    }
    rep[cnt++] = ac;
  }
  printf("%d\n", cnt);
  for (int i = 0; i < cnt; i++) {
    printf("%d ", rep[i].size());
    for (int j = 0; j < rep[i].size(); j++) {
      cout << rep[i][j] << " ";
    }
    cout << endl;
  }
}