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 Edge {
  int64_t flow, cap;
  int64_t u, v;
  int64_t opos;
  Edge() {}
  Edge(int64_t u1, int64_t v1, int64_t cap1, int64_t flow1 = 0)
      : u(u1), v(v1), cap(cap1), flow(flow1){};
};
int64_t mod = 21092013, inf = 4e18;
int64_t sum = 0;
int64_t tmp3 = 0, tmp = 0, tmp2 = 0, comb = 1;
vector<int64_t> check, st;
vector<vector<Edge>> g;
int64_t maxi = 0, mini = inf;
string s2, s;
int64_t n, m, logn = 0;
bool bfs(vector<vector<Edge>>& gr, vector<Edge*>& par, int64_t s, int64_t t) {
  queue<int64_t> q;
  vector<int64_t> check(gr.size(), 0);
  for (q.push(s), check[s] = 1; !q.empty() && check[t] == 0; q.pop()) {
    for (auto& e : gr[q.front()]) {
      if (check[e.v] || e.cap == 0) continue;
      q.push(e.v);
      check[e.v] = 1;
      par[e.v] = &e;
    }
  }
  return check[t];
}
int64_t ford_fulkerson(vector<vector<Edge>>& g, int64_t s, int64_t t,
                       vector<vector<int64_t>>& res) {
  int64_t n = g.size(), mf = 0;
  vector<vector<Edge>> gr(n);
  for (int64_t i = 0; i < n; i++) {
    for (int64_t j = 0; j < g[i].size(); j++) {
      gr[i].push_back(g[i][j]);
      gr[g[i][j].v].push_back(Edge(g[i][j].v, i, 0, -1));
      gr[i].back().opos = gr[g[i][j].v].size() - 1;
      gr[g[i][j].v].back().opos = gr[i].size() - 1;
    }
  }
  for (vector<Edge*> par(n); bfs(gr, par, s, t);) {
    int64_t mini = inf;
    for (int64_t cur = t; cur != s; cur = par[cur]->u)
      mini = min(mini, par[cur]->cap);
    mf += mini;
    for (int64_t cur = t; cur != s; cur = par[cur]->u) {
      par[cur]->cap -= mini;
      gr[par[cur]->v][par[cur]->opos].cap += mini;
      if (par[cur]->flow > -1)
        par[cur]->flow += mini;
      else
        gr[par[cur]->v][par[cur]->opos].flow -= mini;
    }
  }
  res.resize(n, vector<int64_t>(n, 0));
  for (int64_t i = 0; i < n; i++) {
    for (auto e : gr[i])
      if (e.flow > -1) {
        res[e.u][e.v] += e.flow;
        res[e.v][e.u] += e.flow;
      }
  }
  return mf;
}
vector<int64_t> a;
bool prime(int64_t n) {
  for (int64_t i = 2; i * i <= n; ++i)
    if (!(n % i)) return 0;
  return 1;
}
void circle(int64_t cur, vector<int64_t>& ans, vector<vector<int64_t>>& res) {
  check[cur] = 1;
  ans.push_back(cur);
  for (int64_t i = 0; i < n; i++) {
    if (res[cur][i] && !check[i]) {
      circle(i, ans, res);
      break;
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  cout << fixed << setprecision(0);
  cin >> n;
  a.resize(n);
  g.resize(n + 2);
  check.resize(n);
  for (int64_t i = 0; i < int64_t(n); ++i)
    cin >> a[i], sum += a[i] % 2 ? 1 : -1;
  if (sum) return cout << "Impossible", 0;
  for (int64_t i = 0; i < n; i++) {
    for (int64_t j = 0; j < n; j++) {
      if (a[i] % 2 && !(a[j] % 2) && prime(a[i] + a[j]))
        g[i].push_back(Edge(i, j, 1));
    }
    if (a[i] % 2)
      g[n].push_back(Edge(n, i, 2));
    else
      g[i].push_back(Edge(i, n + 1, 2));
  }
  vector<vector<int64_t>> res, ans;
  if (ford_fulkerson(g, n, n + 1, res) < n) return cout << "Impossible", 0;
  for (int64_t i = 0; i < n; i++) {
    if (!check[i]) {
      ans.push_back(vector<int64_t>());
      circle(i, ans.back(), res);
    }
  }
  cout << ans.size() << endl;
  for (auto c : ans) {
    cout << c.size() << ' ';
    for (auto e : c) cout << e + 1 << ' ';
    cout << endl;
  }
  return 0;
}