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 maxn = 210;
const long long Max = 2e4 + 10;
long long n, a[maxn];
vector<long long> va, vb;
bool prim[Max];
vector<pair<long long, long long> > v[maxn];
vector<vector<long long> > Ans;
vector<long long> vec;
bool vis[maxn];
long long par[maxn], mn[maxn];
pair<long long, long long> f[maxn];
inline void edge(long long x, long long y) {
  v[x].push_back(make_pair(y + n, 1));
  v[y + n].push_back(make_pair(x, 0));
}
void dfs(long long u) {
  vis[u] = 1;
  for (pair<long long, long long> p : v[u]) {
    if (!vis[p.first] && p.second) {
      par[p.first] = u;
      mn[p.first] = min(mn[u], p.second);
      dfs(p.first);
    }
  }
}
long long max_flow(long long s, long long t) {
  long long ans = 0;
  while (true) {
    memset(vis, 0, sizeof vis);
    memset(par, 0, sizeof par);
    memset(mn, 0, sizeof mn);
    mn[s] = 10 * n;
    dfs(s);
    if (mn[t] == 0) break;
    long long tmp = t, x = mn[t];
    ans += x;
    while (tmp != s) {
      for (int i = 0; i < int(int((v[tmp]).size())); i++) {
        if (v[tmp][i].first == par[tmp]) v[tmp][i].second += x;
      }
      for (int i = 0; i < int(int((v[par[tmp]]).size())); i++) {
        if (v[par[tmp]][i].first == tmp) v[par[tmp]][i].second -= x;
      }
      tmp = par[tmp];
    }
  }
  return ans;
}
int main() {
  prim[1] = 1;
  for (int i = int(2); i <= int(Max - 1); i++) {
    if (!prim[i]) {
      for (int j = int(2 * i); j <= Max - 1; j += i) {
        prim[j] = 1;
      }
    }
  }
  cin >> n;
  for (int i = int(1); i <= int(n); i++) {
    cin >> a[i];
    if (a[i] % 2)
      va.push_back(i);
    else
      vb.push_back(i);
  }
  if (int((va).size()) != int((vb).size())) {
    cout << "Impossible";
    return 0;
  }
  n = int((va).size());
  for (int i = int(1); i <= int(n); i++) {
    for (int j = int(1); j <= int(n); j++) {
      if (!prim[a[va[i - 1]] + a[vb[j - 1]]]) edge(i, j);
    }
  }
  for (int i = int(1); i <= int(n); i++) {
    v[0].push_back(make_pair(i, 2));
    v[i].push_back(make_pair(0, 0));
  }
  for (int i = int(n + 1); i <= int(2 * n); i++) {
    v[i].push_back(make_pair(2 * n + 1, 2));
    v[2 * n + 1].push_back(make_pair(i, 0));
  }
  if (max_flow(0, 2 * n + 1) != (2 * n)) {
    cout << "Impossible";
    return 0;
  }
  for (int i = int(1); i <= int(2 * n); i++) {
    for (pair<long long, long long> p : v[i]) {
      if ((p.second == 0 && i <= n) || (p.second == 1 && i > n)) {
        if (f[i].first == 0)
          f[i].first = p.first;
        else
          f[i].second = p.first;
      }
    }
  }
  memset(vis, 0, sizeof vis);
  for (int i = int(1); i <= int(2 * n); i++) {
    if (!vis[i]) {
      vec.clear();
      long long tmp = i, bef = -1;
      while (!vis[tmp]) {
        vis[tmp] = 1;
        if (tmp > n)
          vec.push_back(vb[tmp - n - 1]);
        else
          vec.push_back(va[tmp - 1]);
        long long nxt;
        if (bef == f[tmp].first)
          nxt = f[tmp].second;
        else
          nxt = f[tmp].first;
        bef = tmp;
        tmp = nxt;
      }
      Ans.push_back(vec);
    }
  }
  cout << int((Ans).size()) << endl;
  for (vector<long long> vv : Ans) {
    cout << int((vv).size());
    for (long long x : vv) cout << " " << x;
    cout << endl;
  }
}