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>
const double PI = acos(-1.0);
using namespace std;
struct EDGES {
  int u, v, cap, flow, nextedge;
};
class MAXIMUM_FLOW {
 public:
  EDGES edge[100000];
  int n, m, level[100000], Prev[100000], last[100000];
  queue<int> Q;
  void init(int N) {
    n = N;
    m = -1;
    for (int j = 0; j <= n; j++) last[j] = -1;
  }
  void addedge(int a, int b, int c) {
    edge[++m].u = a, edge[m].v = b, edge[m].cap = c, edge[m].flow = 0,
    edge[m].nextedge = last[a], last[a] = m;
    edge[++m].u = b, edge[m].v = a, edge[m].cap = 0, edge[m].flow = 0,
    edge[m].nextedge = last[b], last[b] = m;
  }
  bool level_graph(int src, int snk) {
    for (int j = 0; j <= n; j++) level[j] = -1;
    int node, nxt;
    level[src] = 1;
    Q.push(src);
    while (!Q.empty()) {
      node = Q.front();
      Q.pop();
      for (int j = last[node]; j != -1; j = edge[j].nextedge) {
        nxt = edge[j].v;
        if (level[nxt] == -1 && edge[j].flow < edge[j].cap) {
          level[nxt] = level[node] + 1;
          Q.push(nxt);
        }
      }
    }
    return (level[snk] != -1);
  }
  int dfs(int node, int snk, int flow) {
    int nxt, curflow;
    if (node == snk) return flow;
    for (int &j = Prev[node]; j != -1; j = edge[j].nextedge) {
      nxt = edge[j].v;
      if (level[nxt] == level[node] + 1 && edge[j].flow < edge[j].cap) {
        curflow = dfs(nxt, snk, min(flow, edge[j].cap - edge[j].flow));
        if (curflow == 0) continue;
        edge[j].flow += curflow;
        edge[j ^ 1].flow -= curflow;
        return curflow;
      }
    }
    return 0;
  }
  int MAX_FLOW(int src, int snk) {
    int flow, ans = 0;
    while (level_graph(src, snk)) {
      for (int j = 0; j <= n; j++) Prev[j] = last[j];
      while (flow = dfs(src, snk, (1 << 31) - 1)) ans += flow;
    }
    return ans;
  }
} dinic;
vector<pair<long long, long long> > even, odd;
bool pr[20010];
bool is_prime(int x) {
  for (int i = 3; i * i <= x; i += 2) {
    if (x % i == 0) return 0;
  }
  return 1;
}
vector<int> g[222];
bool vis[222];
int a[222];
vector<int> cur;
void dfs(int node) {
  vis[node] = 1;
  cur.push_back(node);
  for (auto nx : g[node]) {
    if (!vis[nx]) dfs(nx);
  }
}
int main() {
  int n;
  cin >> n;
  even.push_back({-1, 0});
  odd.push_back({-1, 0});
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    a[i] = x;
    if (x % 2)
      odd.push_back({x, i});
    else
      even.push_back({x, i});
  }
  if (even.size() != odd.size()) {
    cout << "Impossible" << '\n';
    return 0;
  }
  for (int i = 3; i <= 20000; i += 2) {
    pr[i] = is_prime(i);
  }
  dinic.init(n + 1);
  int src = 0;
  int snk = n + 1;
  int e = even.size() - 1, o = odd.size() - 1;
  for (int i = 1; i <= e; i++) {
    dinic.addedge(src, even[i].second, 2);
  }
  for (int i = 1; i <= o; i++) {
    dinic.addedge(odd[i].second, snk, 2);
  }
  for (int i = 1; i <= e; i++) {
    for (int j = 1; j <= o; j++) {
      int x = even[i].first + odd[j].first;
      if (pr[x]) dinic.addedge(even[i].second, odd[j].second, 1);
    }
  }
  if (dinic.MAX_FLOW(src, snk) != n) {
    cout << "Impossible" << '\n';
    return 0;
  }
  int m = dinic.m;
  for (int i = 0; i < m; i += 2) {
    int u = dinic.edge[i].u;
    int v = dinic.edge[i].v;
    int f = dinic.edge[i].flow;
    if (u == src || v == snk || f <= 0) continue;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  vector<vector<int> > all;
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    cur.clear();
    dfs(i);
    all.push_back(cur);
  }
  cout << all.size() << '\n';
  for (int i = 0; i < all.size(); i++) {
    vector<int> cur = all[i];
    cout << cur.size() << " ";
    for (auto x : cur) cout << x << " ";
    cout << '\n';
  }
}
