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.
#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << " , ";
  err(++it, args...);
}
const int mod = 998244353;
long long qp(long long b, long long n) {
  long long r = 1;
  if (n < 0) n += mod - 1;
  b %= mod;
  for (; n; n >>= 1, b = b * b % mod)
    if (n & 1) r = r * b % mod;
  return r;
}
const int maxn = 2e4 + 7;
struct Edge {
  int to, nxt, cap, w;
} edge[maxn];
int head[maxn];
int tot = 0;
void addedge(int u, int v, int w, int rw = 0) {
  edge[tot].to = v;
  edge[tot].nxt = head[u];
  edge[tot].cap = w;
  edge[tot].w = 0;
  head[u] = tot++;
  edge[tot].to = u;
  edge[tot].nxt = head[v];
  edge[tot].cap = rw;
  edge[tot].w = 0;
  head[v] = tot++;
}
void init() {
  tot = 2;
  memset(head, -1, sizeof(head));
}
int dep[maxn], q[maxn];
bool bfs(int s, int t, int n) {
  memset(dep, -1, sizeof(dep));
  dep[s] = 0;
  int f = 0, tail = 0;
  q[tail++] = s;
  while (f < tail) {
    int u = q[f++];
    for (int i = head[u]; i != -1; i = edge[i].nxt) {
      int v = edge[i].to;
      if (edge[i].cap > edge[i].w && dep[v] == -1) {
        dep[v] = dep[u] + 1, q[tail++] = v;
        if (v == t) return 1;
      }
    }
  }
  return 0;
}
int sta[maxn], cur[maxn];
int dinic(int s, int t, int n) {
  int mx = 0;
  while (bfs(s, t, n)) {
    for (int i = 0; i < n; ++i) cur[i] = head[i];
    int u = s, tp = 0;
    while (cur[s] != -1) {
      if (u == t) {
        int tmp = 2000000009;
        for (int i = tp - 1; i >= 0; --i)
          tmp = min(tmp, edge[sta[i]].cap - edge[sta[i]].w);
        mx += tmp;
        for (int i = tp - 1; i >= 0; --i) {
          edge[sta[i]].w += tmp;
          edge[sta[i] ^ 1].w -= tmp;
          if (edge[sta[i]].cap == edge[sta[i]].w) tp = i;
        }
        u = edge[sta[tp] ^ 1].to;
      } else if (cur[u] != 1 && edge[cur[u]].cap > edge[cur[u]].w &&
                 dep[u] + 1 == dep[edge[cur[u]].to])
        sta[tp++] = cur[u], u = edge[cur[u]].to;
      else {
        while (u != s && cur[u] == -1) u = edge[sta[--tp] ^ 1].to;
        cur[u] = edge[cur[u]].nxt;
      }
    }
  }
  return mx;
}
int isp[maxn], p[maxn];
void Prime() {
  int tot = 0;
  for (int i = 2; i < maxn; ++i) {
    if (!isp[i]) p[tot++] = i;
    for (int j = 0; j < tot && p[j] * 1LL * i < maxn; ++j) {
      int tmp = p[j] * i;
      isp[tmp] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int a[maxn];
vector<int> G[maxn];
vector<vector<int> > ans;
int vis[maxn];
int now = -1;
void dfs(int u) {
  if (vis[u]) return;
  vis[u] = 1;
  ans[now].emplace_back(u);
  for (auto v : G[u]) dfs(v);
}
int main() {
  Prime();
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  init();
  vector<int> even, odd;
  for (int i = 1; i <= n; ++i)
    if (a[i] % 2 == 0)
      even.emplace_back(i);
    else
      odd.emplace_back(i);
  if (odd.size() != even.size()) return puts("Impossible"), 0;
  n = odd.size();
  int S = 0, T = n * 2 + 1;
  for (int i = 0; i < (int)(odd.size()); ++i) {
    for (int j = 0; j < (int)(even.size()); ++j) {
      if (isp[a[odd[i]] + a[even[j]]]) continue;
      addedge(i + 1, j + 1 + n, 1);
    }
  }
  for (int i = 1; i <= n; ++i) addedge(S, i, 2), addedge(i + n, T, 2);
  if (dinic(S, T, T + 1) != n * 2) return puts("Impossible"), 0;
  for (int i = 1; i <= n; ++i)
    for (int j = head[i]; j != -1; j = edge[j].nxt)
      if (edge[j].w && edge[j].to)
        G[i].emplace_back(edge[j].to), G[edge[j].to].emplace_back(i);
  for (int i = 1; i <= n; ++i)
    if (vis[i] == 0) ans.emplace_back(vector<int>()), ++now, dfs(i);
  cout << now + 1 << endl;
  for (auto x : ans) {
    cout << x.size();
    for (auto v : x) {
      cout << ' ' << (v > n ? even[v - n - 1] : odd[v - 1]);
    }
    cout << endl;
  }
}
