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 = 1e9;
const long long inf_ll = 1e18;
template <int N, typename T>
struct flow {
  const bool SCALING = true;
  const T inf_T = numeric_limits<T>::max();
  struct flow_edge {
    int v, u;
    T f, w;
  };
  vector<flow_edge> adj[N];
  int l[N], p[N], s, t;
  T k;
  void edge(int i, int j, T w, bool directed = true) {
    adj[i].push_back({j, int(adj[j].size()), 0, w});
    adj[j].push_back({i, int(adj[i].size()) - 1, 0, directed ? 0 : w});
  }
  bool bfs() {
    queue<int> q({s});
    fill(l, l + N, -1), l[s] = 0;
    while (!q.empty() && l[t] == -1) {
      int v = q.front();
      q.pop();
      for (auto& e : adj[v])
        if (l[e.v] == -1 && e.f < e.w && (!SCALING || e.w - e.f >= k))
          q.push(e.v), l[e.v] = l[v] + 1;
    }
    return l[t] != -1;
  }
  T dfs(int v, T f) {
    if (v == t || !f) return f;
    for (; p[v] < adj[v].size(); p[v]++) {
      auto& e = adj[v][p[v]];
      if (l[e.v] != l[v] + 1) continue;
      if (T x = dfs(e.v, min(f, e.w - e.f))) {
        e.f += x, adj[e.v][e.u].f -= x;
        return x;
      }
    }
    return 0;
  }
  T solve(int _s, int _t) {
    s = _s, t = _t;
    T out = 0;
    for (k = SCALING ? 1 << 30 : 1; k > 0; k /= 2)
      while (bfs()) {
        fill(p, p + N, 0);
        while (T x = dfs(s, inf_T)) out += x;
      }
    return out;
  }
  vector<bool> cut() {
    vector<bool> out(N, 0);
    out[s] = 1;
    queue<int> q({s});
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (auto& e : adj[v])
        if (e.f < e.w && !out[e.v]) out[e.v] = 1, q.push(e.v);
    }
    return out;
  }
};
template <typename T>
vector<bool> primesieve(T n) {
  vector<bool> sieve(n, 1);
  for (T i = 2; i < n; i++)
    if (sieve[i])
      for (T j = 2 * i; j < n; j += i) sieve[j] = 0;
  return sieve;
}
flow<500, long long> f;
auto p = primesieve(100000);
vector<int> stk, adj[500];
int v[500];
void dfs(int i) {
  v[i] = 1, stk.push_back(i);
  for (auto& j : adj[i])
    if (!v[j]) dfs(j);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<array<int, 2>> a, b;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x & 1)
      a.push_back({x, i}), f.edge(n, i, 2);
    else
      b.push_back({x, i}), f.edge(i, n + 1, 2);
  }
  for (int i = 0; i < a.size(); i++)
    for (int j = 0; j < b.size(); j++)
      if (p[a[i][0] + b[j][0]]) f.edge(a[i][1], b[j][1], 1);
  if (f.solve(n, n + 1) != n) return cout << "Impossible\n", 0;
  for (auto& [_, i] : a)
    for (auto& e : f.adj[i])
      if (e.f == e.w) adj[i].push_back(e.v), adj[e.v].push_back(i);
  vector<vector<int>> t;
  for (int i = 0; i < n; i++)
    if (!v[i]) stk.clear(), dfs(i), t.push_back(stk);
  cout << t.size() << "\n";
  for (auto& vec : t) {
    cout << vec.size();
    for (auto& x : vec) cout << " " << x + 1;
    cout << "\n";
  }
}