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;
struct MaxFlow {
  struct Edge {
    int u, v;
    int f, c;
    Edge(int u, int v, int f, int c) : u(u), v(v), f(f), c(c) {}
  };
  vector<vector<int> > g;
  vector<Edge> e;
  int *ptr, *dist, *q, n, source, sink;
  MaxFlow(int n) : n(n) {
    dist = (int *)malloc(sizeof(int) * n);
    q = (int *)malloc(sizeof(int) * n);
    ptr = (int *)malloc(sizeof(int) * n);
    g.resize(n);
  }
  ~MaxFlow() {
    free(dist);
    free(ptr);
    free(q);
    g.clear();
    e.clear();
  }
  void add(int u, int v, int c, int rc = 0) {
    g[u].push_back(e.size());
    e.push_back(Edge(u, v, 0, c));
    g[v].push_back(e.size());
    e.push_back(Edge(v, u, 0, rc));
  }
  int flow(int source, int sink) {
    this->source = source;
    this->sink = sink;
    int res = 0;
    while (bfs()) {
      memset(ptr, 0, sizeof(int) * n);
      while (int pushed = dfs(source, 1e9)) res += pushed;
    }
    return res;
  }
  bool bfs() {
    memset(dist, 63, sizeof(int) * n);
    int st = 0, en = 0;
    q[en++] = source;
    dist[source] = 0;
    while (st < en) {
      int u = q[st++];
      for (int i = 0; i < (int)g[u].size(); ++i) {
        int id = g[u][i];
        int v = e[id].v;
        if (dist[v] > dist[u] + 1 && e[id].f < e[id].c) {
          dist[v] = dist[u] + 1;
          q[en++] = v;
          if (v == sink) return 1;
        }
      }
    }
    return 0;
  }
  int dfs(int u, int flow) {
    if (u == sink || flow == 0) return flow;
    for (int &i = ptr[u]; i < (int)g[u].size(); ++i) {
      int id = g[u][i];
      int v = e[id].v;
      int pushed;
      if (dist[v] == dist[u] + 1 &&
          (pushed = dfs(v, min(flow, e[id].c - e[id].f)))) {
        e[id].f += pushed;
        e[id ^ 1].f -= pushed;
        return pushed;
      }
    }
    return 0;
  }
};
vector<vector<int> > ans;
vector<int> g[205 + 1];
vector<bool> vis(205 + 1);
void dfs(int u, vector<int> &x) {
  x.push_back(u);
  vis[u] = 1;
  for (int i = 0; i < g[u].size(); ++i) {
    int v = g[u][i];
    if (vis[v]) continue;
    assert(v ^ u);
    dfs(v, x);
  }
}
bool isPrime[(int)1e5 + 1];
int main() {
  memset(isPrime, 1, sizeof isPrime);
  for (int i = 2; i <= 1e5; ++i) {
    if (isPrime[i])
      for (int j = i + i; j <= 1e5; j += i) isPrime[j] = 0;
  }
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  MaxFlow mf(n + 2);
  int source = 0, sink = n + 1;
  int a[1001];
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) {
    if (a[i] & 1) {
      mf.add(i, sink, 2);
      continue;
    }
    mf.add(source, i, 2);
    for (int j = 1; j <= n; ++j)
      if (a[j] & 1 && isPrime[a[i] + a[j]]) mf.add(i, j, 1);
  }
  int ret = mf.flow(source, sink);
  if (ret ^ n)
    cout << "Impossible\n";
  else {
    vector<MaxFlow::Edge> &e = mf.e;
    for (int i = 0; i < e.size(); ++i) {
      int u = e[i].u;
      int v = e[i].v;
      if (e[i].f == 1 || e[i].f == 0)
        assert(u >= 1 && u <= n && v >= 1 && v <= n);
      if (e[i].f == 2) assert(u == source || v == sink);
      if (e[i].f == 1) g[u].push_back(v), g[v].push_back(u);
    }
    for (int i = 1; i <= n; ++i)
      if (!vis[i]) {
        ans.push_back(vector<int>());
        dfs(i, ans.back());
      }
    cout << ans.size() << "\n";
    for (int i = 0; i < ans.size(); ++i) {
      cout << ans[i].size() << " ";
      for (int j = 0; j < ans[i].size(); ++j) cout << ans[i][j] << " ";
      cout << "\n";
    }
  }
}