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 = 1e5 + 10;
int gi() {
  int x = 0, o = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') o = -1, ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * o;
}
using flow_t = int;
const flow_t inf = 1e9;
int to[N], tt = 1, nxt[N], dep[N], cur[N], h[N], s, t;
flow_t ww[N];
void adde(int u, int v, flow_t w) {
  to[++tt] = v, ww[tt] = w, nxt[tt] = h[u], h[u] = tt;
  to[++tt] = u, ww[tt] = 0, nxt[tt] = h[v], h[v] = tt;
}
bool bfs() {
  memset(dep, 0, sizeof(dep));
  queue<int> q;
  q.push(s);
  dep[s] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = h[u], v; v = to[i], i; i = nxt[i])
      if (!dep[v] && ww[i]) {
        dep[v] = dep[u] + 1, q.push(v);
        if (v == t) return 1;
      }
  }
  return 0;
}
flow_t dfs(int u, flow_t flow) {
  if (u == t) return flow;
  flow_t ret = 0;
  for (int &i = cur[u], v; v = to[i], i; i = nxt[i])
    if (dep[v] == dep[u] + 1 && ww[i]) {
      flow_t d = dfs(v, min(flow, ww[i]));
      ww[i] -= d, ww[i ^ 1] += d, ret += d, flow -= d;
      if (!flow) break;
    }
  if (flow) dep[u] = 0;
  return ret;
}
flow_t dinic() {
  flow_t ret = 0;
  while (bfs()) {
    memcpy(cur, h, sizeof(h));
    ret += dfs(s, inf);
  }
  return ret;
}
int n, a[N];
bool vis[N];
vector<int> E[N], ring;
vector<vector<int>> ans;
void No() {
  puts("Impossible");
  exit(0);
}
void dfs(int u) {
  vis[u] = 1;
  ring.push_back(u);
  for (auto v : E[u])
    if (!vis[v]) dfs(v);
}
int main() {
  vis[1] = 1;
  for (int i = 2; i < N; i++)
    if (!vis[i])
      for (int j = i + i; j < N; j += i) vis[j] = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) a[i] = gi();
  if (n & 1) No();
  s = 0, t = n + 1;
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] & 1) {
      adde(s, i, 2);
      ++cnt;
      for (int j = 1; j <= n; j++)
        if (!vis[a[i] + a[j]]) adde(i, j, 1);
    } else
      adde(i, t, 2);
  if (cnt != n / 2) No();
  if (dinic() != n) No();
  for (int u = 1; u <= n; u++)
    if (a[u] & 1)
      for (int i = h[u], v; v = to[i], i; i = nxt[i])
        if (1 <= v && v <= n && !ww[i]) E[u].push_back(v), E[v].push_back(u);
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++)
    if (!vis[i]) ring.clear(), dfs(i), ans.push_back(ring);
  cout << ans.size() << endl;
  for (auto x : ans) {
    cout << x.size();
    for (auto y : x) cout << ' ' << y;
    cout << endl;
  }
  return 0;
}