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 long long INF = 1000000000000000000LL;
struct Edge {
  int u, v;
  long long cap[2], flow;
};
vector<int> d, act;
bool bfs(int s, int t, vector<vector<int> >& adj, vector<Edge>& E) {
  queue<int> Q;
  d = vector<int>(adj.size(), -1);
  d[t] = 0;
  Q.push(t);
  while (not Q.empty()) {
    int u = Q.front();
    Q.pop();
    for (int i = 0; i < adj[u].size(); ++i) {
      int e = adj[u][i], v = ((E[e].u == u) ? E[e].v : E[e].u);
      if (((E[e].u == v) ? E[e].cap[0] - E[e].flow : E[e].cap[1] + E[e].flow) >
              0 and
          d[v] == -1) {
        d[v] = d[u] + 1;
        Q.push(v);
      }
    }
  }
  return d[s] >= 0;
}
long long dfs(int u, int t, long long bot, vector<vector<int> >& adj,
              vector<Edge>& E) {
  if (u == t) return bot;
  for (; act[u] < adj[u].size(); ++act[u]) {
    int e = adj[u][act[u]];
    if (((E[e].u == u) ? E[e].cap[0] - E[e].flow : E[e].cap[1] + E[e].flow) >
            0 and
        d[u] == d[((E[e].u == u) ? E[e].v : E[e].u)] + 1) {
      long long inc = dfs(((E[e].u == u) ? E[e].v : E[e].u), t,
                          min(bot, ((E[e].u == u) ? E[e].cap[0] - E[e].flow
                                                  : E[e].cap[1] + E[e].flow)),
                          adj, E);
      if (inc) {
        E[e].flow += ((E[e].u == u) ? (inc) : (-(inc)));
        return inc;
      }
    }
  }
  return 0;
}
long long maxflow(int s, int t, vector<vector<int> >& adj, vector<Edge>& E) {
  for (int i = 0; i < E.size(); ++i) E[i].flow = 0;
  long long flow = 0, bot;
  while (bfs(s, t, adj, E)) {
    act = vector<int>(adj.size(), 0);
    while ((bot = dfs(s, t, INF, adj, E))) flow += bot;
  }
  return flow;
}
bool primer(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int source = n, sink = n + 1;
  vector<vector<int> > adj(n + 2);
  vector<Edge> E;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) {
    if (v[i] % 2 == 0) {
      Edge e;
      e.u = i;
      e.v = sink;
      e.cap[0] = 2;
      e.cap[1] = 0;
      adj[e.u].push_back(E.size());
      adj[e.v].push_back(E.size());
      E.push_back(e);
    } else {
      Edge e;
      e.u = source;
      e.v = i;
      e.cap[0] = 2;
      e.cap[1] = 0;
      adj[e.u].push_back(E.size());
      adj[e.v].push_back(E.size());
      E.push_back(e);
    }
    for (int j = i + 1; j < n; ++j) {
      if (primer(v[i] + v[j])) {
        Edge e;
        if (v[i] % 2 == 0) {
          e.u = j;
          e.v = i;
        } else {
          e.u = i;
          e.v = j;
        }
        e.cap[0] = 1;
        e.cap[1] = 0;
        adj[e.u].push_back(E.size());
        adj[e.v].push_back(E.size());
        E.push_back(e);
      }
    }
  }
  int res = maxflow(source, sink, adj, E);
  if (res == n) {
    vector<vector<int> > solution;
    vector<bool> vis(n, false);
    vector<pair<int, int> > vp(n);
    for (int i = 0; i < n; i++) {
      bool primer = false;
      for (int j = 0; j < adj[i].size(); j++) {
        if (E[adj[i][j]].flow == 1) {
          if (!primer) {
            vp[i].first = E[adj[i][j]].v ^ E[adj[i][j]].u ^ i;
            primer = true;
          } else {
            vp[i].second = E[adj[i][j]].v ^ E[adj[i][j]].u ^ i;
          }
        }
      }
    }
    for (int i = 0; i < n; i++) {
      if (vis[i]) continue;
      vector<int> aux;
      int pos = i;
      while (true) {
        aux.push_back(pos);
        vis[pos] = true;
        if (!vis[vp[pos].first]) {
          pos = vp[pos].first;
        } else if (!vis[vp[pos].second]) {
          pos = vp[pos].second;
        } else
          break;
      }
      solution.push_back(aux);
    }
    cout << solution.size() << endl;
    for (int i = 0; i < solution.size(); i++) {
      cout << solution[i].size();
      for (int j = 0; j < solution[i].size(); j++) {
        cout << ' ';
        cout << solution[i][j] + 1;
      }
      cout << endl;
    }
  } else
    cout << "Impossible" << endl;
}