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 int inf = 1000000000;
const int MOD = 1000000007;
const double pi = acos(-1.0);
template <int maxFlowSize>
class MaxFlow {
 public:
  class Edge {
   public:
    int from, to, upper, flow;
    Edge(int _from, int _to, int _upper) {
      from = _from;
      to = _to;
      upper = _upper;
      flow = 0;
    }
  };
  vector<int> g[maxFlowSize];
  vector<Edge> e;
  void Clear() {
    e.clear();
    for (int i = 0; i < maxFlowSize; ++i) g[i].clear();
  }
  void addEdge(int from, int to, int upper) {
    Edge e1 = Edge(from, to, upper);
    Edge e2 = Edge(to, from, 0);
    g[from].push_back(e.size());
    e.push_back(e1);
    g[to].push_back(e.size());
    e.push_back(e2);
  }
  int source, sink;
  int d[maxFlowSize];
  int q[maxFlowSize];

 private:
  bool bfs() {
    memset(d, 63, sizeof(d));
    int qh = 0, qt = 0;
    d[source] = 0;
    q[qt++] = source;
    while (qh < qt) {
      int v = q[qh++];
      for (int i = 0; i < g[v].size(); ++i) {
        int eid = g[v][i];
        if (e[eid].flow < e[eid].upper) {
          int to = e[eid].to;
          if (d[to] > d[v] + 1) {
            d[to] = d[v] + 1;
            q[qt++] = to;
          }
        }
      }
    }
    return d[sink] < maxFlowSize + 1;
  }

 private:
  int ptr[maxFlowSize];
  int dfs(int v, int cur) {
    if (cur == 0 || v == sink) return cur;
    for (; ptr[v] < g[v].size(); ++ptr[v]) {
      int eid = g[v][ptr[v]];
      int to = e[eid].to;
      if (d[to] != d[v] + 1) continue;
      int add = dfs(to, min(cur, e[eid].upper - e[eid].flow));
      if (add) {
        e[eid].flow += add;
        e[eid ^ 1].flow -= add;
        return add;
      }
    }
    return 0;
  }

 public:
  int getMaxFlow() {
    int ans = 0;
    for (;;) {
      if (!bfs()) break;
      memset(ptr, 0, sizeof(ptr));
      for (;;) {
        int cur = dfs(source, 1000000000);
        ans += cur;
        if (!cur) break;
      }
    }
    return ans;
  }
};
MaxFlow<222> net;
bool isprime[20009];
int a[222];
vector<int> G[222];
bool used[222];
void dfs(int v, vector<int> &cur) {
  cur.push_back(v);
  used[v] = true;
  for (int i = (0); i <= ((int)((G[v]).size()) - 1); ++i) {
    int to = G[v][i];
    if (used[to]) continue;
    dfs(to, cur);
  }
}
int main() {
  for (int i = (2); i <= (20000); ++i) {
    isprime[i] = true;
    for (int j = 2; j * j <= i; ++j)
      if (i % j == 0) isprime[i] = false;
  }
  int n;
  cin >> n;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
  net.Clear();
  net.source = 0;
  net.sink = n + 1;
  for (int i = (1); i <= (n); ++i)
    if (a[i] % 2 == 0) {
      net.addEdge(net.source, i, 2);
    } else {
      net.addEdge(i, net.sink, 2);
    }
  for (int i = (1); i <= (n); ++i)
    if (a[i] % 2 == 0)
      for (int j = (1); j <= (n); ++j)
        if (isprime[a[i] + a[j]]) net.addEdge(i, j, 1);
  int flow = net.getMaxFlow();
  if (flow != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = (1); i <= (n); ++i)
    if (a[i] % 2 == 0) {
      for (int j = (0); j <= ((int)((net.g[i]).size()) - 1); ++j) {
        int to = net.e[net.g[i][j]].to;
        if (to >= 1 && to <= n && net.e[net.g[i][j]].flow > 0) {
          G[i].push_back(to);
          G[to].push_back(i);
        }
      }
    }
  memset(used, false, sizeof(used));
  vector<vector<int> > ans;
  for (int i = (1); i <= (n); ++i)
    if (!used[i]) {
      vector<int> temp;
      dfs(i, temp);
      ans.push_back(temp);
    }
  cout << (int)((ans).size()) << endl;
  for (int i = (0); i <= ((int)((ans).size()) - 1); ++i) {
    cout << (int)((ans[i]).size());
    for (int j = (0); j <= ((int)((ans[i]).size()) - 1); ++j)
      cout << " " << ans[i][j];
    cout << endl;
  }
}