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;
inline int read() {
  int x = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return w == 1 ? x : -x;
}
struct node {
  int from, to, cap, flow;
};
vector<node> edges;
vector<int> mp[200005];
int n, m, s, t, d[200005], cur[200005];
bool vis[200005];
queue<int> que;
inline void add_edge(int u, int v, int w) {
  edges.push_back((node){u, v, w, 0});
  edges.push_back((node){v, u, 0, 0});
  int pp = edges.size();
  mp[u].push_back(pp - 2);
  mp[v].push_back(pp - 1);
}
inline bool bfs() {
  for (int i = 0; i <= t; i++) d[i] = 1e9, vis[i] = 0;
  d[s] = 0;
  vis[s] = 1;
  que.push(s);
  while (!que.empty()) {
    int u = que.front();
    que.pop();
    for (int i = 0; i < mp[u].size(); i++) {
      node v = edges[mp[u][i]];
      if (v.cap - v.flow > 0 && !vis[v.to]) {
        d[v.to] = d[u] + 1;
        vis[v.to] = 1;
        que.push(v.to);
      }
    }
  }
  if (vis[t]) return true;
  return false;
}
inline int dfs(int u, int w) {
  int flow = 0, r = 0;
  if (u == t || w == 0) return w;
  for (int i = 0; i < mp[u].size(); i++) {
    node &v = edges[mp[u][i]];
    if (d[v.to] == d[u] + 1 && (r = dfs(v.to, min(v.cap - v.flow, w))) > 0) {
      flow += r;
      edges[mp[u][i]].flow += r;
      edges[mp[u][i] ^ 1].flow -= r;
      w -= r;
      if (w == 0) break;
    }
  }
  return flow;
}
inline int max_flow() {
  int ff = 0;
  while (bfs()) {
    memset(cur, 0, sizeof(cur));
    ff += dfs(s, 1e9);
  }
  return ff;
}
int a[200005], prime[200005], cnt, cnt2;
bool pri[200005], vis2[200005];
vector<int> ans[200005];
inline void dfs2(int u) {
  vis2[u] = 1;
  ans[cnt2].push_back(u);
  for (int i = 0; i < mp[u].size(); i++) {
    node v = edges[mp[u][i]];
    if (vis2[v.to] || v.flow == 0)
      continue;
    else
      dfs2(v.to);
  }
}
int main() {
  int n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 2; i <= 100005; i++) {
    if (pri[i] == 0) prime[++cnt] = i;
    for (int j = 1; j <= cnt && i * prime[j] <= 100005; j++) {
      pri[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
  s = 0;
  t = n + 1;
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2 == 0)
      add_edge(s, i, 2);
    else
      add_edge(i, t, 2);
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2 == 0)
      for (int j = 1; j <= n; j++)
        if (pri[a[i] + a[j]] == 0) add_edge(i, j, 1);
  }
  if (max_flow() != n)
    puts("Impossible");
  else {
    vis2[0] = 1;
    vis2[n + 1] = 1;
    for (int i = 0; i < mp[s].size(); i++) {
      node v = edges[mp[s][i]];
      if (v.flow == 2 && vis2[v.to] == 0) {
        cnt2++;
        dfs2(v.to);
      }
    }
    cout << cnt2 << endl;
    for (int i = 1; i <= cnt2; i++) {
      printf("%d ", ans[i].size());
      for (int j = 0; j < ans[i].size(); j++) printf("%d ", ans[i][j]);
      puts("");
    }
  }
  return 0;
}
