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;
int v[2 * 90000], l[2 * 90000];
long c[2 * 90000];
int sz[300], po[300], r[300], n, S, T;
map<int, long> CAP[300];
void iniG() {
  n = 0;
  memset(sz, 0, sizeof(sz));
  for (int i = 0; i < (int)(300); ++i) CAP[i].clear();
}
void aEje(int d, int h, long cap) {
  if (d == h) return;
  n = max(n, max(d, h));
  pair<map<int, long>::iterator, bool> par = CAP[d].insert(make_pair(h, 0));
  if (par.second) {
    CAP[h][d] = 0;
    sz[d]++;
    sz[h]++;
  }
  par.first->second += max(cap, (long)0);
}
void _aEje(int d, int h, long capDH, long capHD) {
  {
    v[po[d]] = h;
    c[po[d]] = capDH;
    l[po[d]] = po[h];
  };
  {
    v[po[h]] = d;
    c[po[h]] = capHD;
    l[po[h]] = po[d];
  };
  po[d]++;
  po[h]++;
}
void _iniG() {
  po[0] = 0;
  for (int i = 0; i < (int)(n - 1); ++i) po[i + 1] = po[i] + sz[i];
  for (int u = 0; u < (int)(n); ++u)
    for (__typeof(CAP[u].begin()) v = CAP[u].begin(); v != CAP[u].end(); ++v)
      if (u < v->first) _aEje(u, v->first, v->second, CAP[v->first][u]);
}
long aumentar() {
  for (int i = 0; i < (int)(n); ++i) r[i] = 1000000000;
  r[T] = 0;
  static int q[300];
  int qf = 0, qb = 0;
  q[qb++] = T;
  while (qb != qf) {
    int x = q[qf++];
    int d = r[x] + 1, b = po[x];
    if (r[S] < 1000000000) break;
    for (int j = b; j < b + sz[x]; j++)
      if (c[l[j]] > 0 && r[v[j]] == 1000000000) {
        r[v[j]] = d;
        q[qb++] = v[j];
      }
  }
  long res = 0;
  static int path[300];
  path[0] = S;
  static int p[300], ind[300];
  for (int i = 0; i < (int)(n); ++i) p[i] = -1;
  int pp = 0;
  while (pp >= 0) {
    int x = path[pp];
    if (x == T) {
      long f = 1000000000;
      int pri = 0;
      for (int i = (pp)-1; i >= 0; --i)
        if (c[ind[i]] <= f) f = c[ind[i]], pri = i;
      for (int i = 0; i < (int)(pp); ++i) c[ind[i]] -= f, c[l[ind[i]]] += f;
      res += f;
      pp = pri;
    } else if (++p[x] < sz[x]) {
      int j = po[x] + p[x];
      if (p[v[j]] < 0 && c[j] > 0 && r[v[j]] < r[x])
        ind[pp] = j, path[++pp] = v[j];
    } else
      pp--;
  }
  return res;
}
long flujo(int ss, int tt) {
  S = ss;
  T = tt;
  n = max(n, max(S, T)) + 1;
  _iniG();
  for (int i = 0; i < (int)(n); ++i) po[i] -= sz[i];
  long res = 0, c;
  do {
    res += (c = aumentar());
  } while (c > 0);
  return res;
}
int nums[256];
int ady[256][256];
int ida[256], vuelta[256];
int added[256];
vector<vector<int> > mesas;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) {
    cin >> nums[i];
  }
  int odd = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (nums[i] % 2) odd++;
  }
  if (odd * 2 != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  int io = 0, ie = odd;
  for (int i = 0; i < (int)(n); ++i) {
    if (nums[i] % 2) {
      ida[i] = io;
      vuelta[io] = i;
      io++;
    } else {
      ida[i] = ie;
      vuelta[ie] = i;
      ie++;
    }
  }
  for (int i = 0; i < (int)(n); ++i)
    for (int j = 0; j < (int)(n); ++j) {
      int goal = nums[i] + nums[j], anda = 1;
      for (int d = 2; d * d <= goal; d++) {
        if (goal % d == 0) {
          anda = 0;
          break;
        }
      }
      if (anda) ady[ida[i]][ida[j]] = 1;
    }
  iniG();
  for (int i = 0; i < (int)(odd); ++i) {
    aEje(n, i, 2);
    aEje(i + odd, n + 1, 2);
  }
  for (int i = 0; i < (int)(odd); ++i)
    for (int j = 0; j < (int)(odd); ++j) {
      if (ady[i][j + odd]) {
        aEje(i, j + odd, 1);
      }
    }
  int res = flujo(n, n + 1);
  if (res != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 0; i < (int)(n); ++i)
    if (!added[i]) {
      vector<int> nmesa;
      int vengo = -1, act = i;
      while (added[act] != 1) {
        added[act] = 1;
        nmesa.push_back(vuelta[act] + 1);
        int pact = act;
        for (int k = po[pact]; k < po[pact] + sz[pact]; k++) {
          if (c[k] == (pact >= odd) && v[k] < n && v[k] != vengo) {
            act = v[k];
          }
        }
        vengo = pact;
      }
      mesas.push_back(nmesa);
    }
  int ms = mesas.size();
  cout << mesas.size() << endl;
  for (int i = 0; i < (int)(ms); ++i) {
    int as = mesas[i].size();
    cout << as;
    for (int j = 0; j < (int)(as); ++j) {
      cout << " ";
      cout << mesas[i][j];
    }
    cout << endl;
  }
  return 0;
}