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;
class Ford_Fulkerson {
  vector<vector<pair<int, int> > > residual;
  vector<vector<pair<int, int> > > network;
  vector<vector<int> > new_graph;
  vector<int> path, vis;
  map<pair<int, int>, int> edges;
  int get_path(int src, int sink, int min_cost = INT_MAX) {
    path.push_back(src);
    if (src == sink) {
      return min_cost;
    }
    int res = 0;
    vis[src] = 1;
    for (int x = 0; x < residual[src].size(); x++) {
      int j = residual[src][x].first;
      if (vis[j] || residual[src][x].second <= 0) continue;
      res = get_path(j, sink, min(min_cost, residual[src][x].second));
      if (res)
        break;
      else
        path.pop_back();
    }
    return res;
  }

 public:
  Ford_Fulkerson(vector<vector<pair<int, int> > > network) {
    this->network = network;
  }
  int get_max_flow(int src, int sink) {
    new_graph = vector<vector<int> >(network.size());
    residual = network;
    int max_flow = 0, cur_flow;
    vis = vector<int>(residual.size(), 0);
    while ((cur_flow = get_path(src, sink))) {
      max_flow += cur_flow;
      for (int i = 0; i < path.size() - 1; i++) {
        int u = path[i];
        int v = path[i + 1];
        for (int k = 0; k < residual[u].size(); k++)
          if (residual[u][k].first == v) {
            residual[u][k].second -= cur_flow;
            break;
          }
        bool added = false;
        for (int k = 0; k < residual[v].size(); k++) {
          if (residual[v][k].first == u) {
            residual[v][k].second += cur_flow;
            added = true;
            break;
          }
        }
        if (!added) residual[v].push_back(make_pair(u, cur_flow));
        edges[make_pair(u, v)]++;
        edges[make_pair(v, u)]--;
      }
      vis = vector<int>(residual.size(), 0);
      path.clear();
    }
    return max_flow;
  }
  vector<int> visited;
  vector<int> route;
  void dfs(int u) {
    route.push_back(u);
    visited[u] = 1;
    for (int j = 0; j < new_graph[u].size(); j++) {
      int v = new_graph[u][j];
      if (!visited[v]) dfs(v);
    }
  }
  vector<vector<int> > get_groups() {
    for (map<pair<int, int>, int>::iterator it = edges.begin();
         it != edges.end(); it++) {
      if (it->second > 0) {
        int u = it->first.first;
        int v = it->first.second;
        if (u == 0 || v == network.size() - 1) continue;
        new_graph[u].push_back(v);
        new_graph[v].push_back(u);
      }
    }
    visited = vector<int>(network.size() + 2, 0);
    vector<vector<int> > res;
    for (int i = 1; i < network.size() - 1; i++) {
      if (!visited[i]) {
        route.clear();
        (dfs(i));
        res.push_back(route);
      }
    }
    return res;
  }
};
bool is_prime(int u) {
  if (u == 1) return false;
  if (u % 2 == 0) return false;
  for (int i = 3; i * i <= u; i += 2) {
    if (u % i == 0) return false;
  }
  return true;
}
int main() {
  int n, a[205];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<vector<pair<int, int> > > net(n + 2);
  for (int i = 0; i < n; i++) {
    if (a[i] % 2) {
      for (int j = 0; j < n; j++) {
        if (i == j) continue;
        if (is_prime(a[i] + a[j])) {
          net[i + 1].push_back(make_pair(j + 1, 1));
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i] % 2)
      net[0].push_back(make_pair(i + 1, 2));
    else
      net[i + 1].push_back(make_pair(n + 1, 2));
  }
  Ford_Fulkerson ford(net);
  int flow = ford.get_max_flow(0, n + 1);
  if (flow != n)
    cout << "Impossible" << endl;
  else {
    vector<vector<int> > groups = ford.get_groups();
    cout << groups.size() << endl;
    for (int j = 0; j < groups.size(); j++) {
      cout << groups[j].size();
      for (int k = 0; k < groups[j].size(); k++) cout << " " << groups[j][k];
      cout << endl;
    }
  }
  return 0;
}