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 long long INF = 1LL << 60;
const int inf = 1 << 30;
const int maxn = 405;
inline void fastio() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int vis[20005], a[maxn], c, head[maxn], cur[maxn], tot, layer[maxn], s, t;
vector<int> g[maxn], res[maxn];
struct edge {
  int u, v, w, nxt;
} es[200005];
void addedge(int u, int v, int w) {
  es[++tot] = (edge){u, v, w, head[u]};
  head[u] = tot;
}
void add(int u, int v, int w) {
  addedge(u, v, w);
  addedge(v, u, 0);
}
void init() {
  int n = 2e4;
  for (int i = (2); i <= (n); i++) {
    if (!vis[i]) {
      for (long long j = (long long)i * i; j <= n; j += i) vis[j] = 1;
    }
  }
}
bool bfs() {
  memset(layer, -1, sizeof(layer));
  layer[s] = 0;
  queue<int> q;
  q.push(s);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = head[u]; ~i; i = es[i].nxt) {
      int v = es[i].v, w = es[i].w;
      if (w > 0 && layer[v] == -1) {
        layer[v] = layer[u] + 1;
        q.push(v);
      }
    }
  }
  return ~layer[t];
}
int dfs(int u, int flow) {
  if (u == t) return flow;
  for (int& i = cur[u]; ~i; i = es[i].nxt) {
    int v = es[i].v, w = es[i].w;
    if (w > 0 && layer[v] == layer[u] + 1) {
      int d = dfs(v, min(flow, w));
      if (d > 0) {
        es[i].w -= d;
        es[i ^ 1].w += d;
        return d;
      }
    }
  }
  return 0;
}
int Dinic() {
  int res = 0;
  while (bfs()) {
    memcpy(cur, head, sizeof(cur));
    while (int d = dfs(s, inf)) res += d;
  }
  return res;
}
void dfs2(int u, int id) {
  res[id].push_back(u);
  vis[u] = 1;
  for (int v : g[u])
    if (!vis[v]) {
      dfs2(v, id);
    }
}
int main() {
  fastio();
  init();
  memset(head, -1, sizeof(head));
  tot = -1;
  int n;
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> a[i];
  for (int i = (1); i <= (n); i++)
    for (int j = (i + 1); j <= (n); j++) {
      if (!vis[a[i] + a[j]]) {
        if (a[i] & 1)
          add(i, j, 1);
        else
          add(j, i, 1);
      }
    }
  s = 0, t = n + 1;
  for (int i = (1); i <= (n); i++) {
    if (a[i] & 1)
      add(s, i, 2);
    else
      add(i, t, 2);
  }
  int maxflow = Dinic();
  if (maxflow < n) {
    cout << "Impossible" << endl;
  } else {
    for (int i = 0; i <= tot; i += 2) {
      int u = es[i].u, v = es[i].v, w = es[i].w;
      if (w == 0 && u != s && v != t) {
        g[u].push_back(v);
        g[v].push_back(u);
      }
    }
    memset(vis, 0, sizeof(vis));
    int ans = 0;
    for (int i = (1); i <= (n); i++)
      if (!vis[i]) dfs2(i, ++ans);
    cout << ans << endl;
    for (int i = (1); i <= (ans); i++) {
      cout << res[i].size();
      for (int x : res[i]) cout << " " << x;
      cout << endl;
    }
  }
  return 0;
}