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 node {
  int v, c, f, op;
  void init(int _v, int _c, int _op) {
    v = _v;
    c = _c;
    op = _op;
    f = 0;
  }
};
vector<node> a[220];
int s, t, n, m, flow = 0;
int tr[220], pos[220];
void add(int u, int v, int c) {
  node x;
  node y;
  x.init(v, c, a[v].size());
  y.init(u, 0, a[u].size());
  a[u].push_back(x);
  a[v].push_back(y);
}
bool findPath() {
  int que[220];
  int l = 1, r = 1;
  memset(tr, -1, sizeof(tr));
  memset(pos, 0, sizeof(pos));
  tr[s] = 0;
  que[l] = s;
  while (l <= r) {
    int u = que[l];
    l++;
    for (int i = 0; i < a[u].size(); i++)
      if (tr[a[u][i].v] == -1 && a[u][i].f < a[u][i].c) {
        int v = a[u][i].v;
        r++;
        que[r] = v;
        tr[v] = u;
        pos[v] = i;
        if (v == t) return (true);
      }
  }
  return false;
}
void incFlow() {
  int x = t;
  int p = 1000000000;
  while (x != s) {
    int u = tr[x];
    int ps = pos[x];
    p = min(p, a[u][ps].c - a[u][ps].f);
    x = u;
    if (x == s) break;
  }
  x = t;
  while (x != s) {
    int u = tr[x];
    int ps = pos[x];
    int _u = x;
    int _ps = a[u][ps].op;
    a[u][ps].f += p;
    a[_u][_ps].f -= p;
    x = u;
    if (x == s) break;
  }
  flow += p;
}
bool prime[20010];
int e[220];
int id[220];
vector<int> ae;
vector<int> ao;
vector<int> ans[220];
vector<int> res[220];
int nId = 0;
void dfs(int u) {
  id[u] = nId;
  res[id[u]].push_back(u);
  for (int j = 0; j < ans[u].size(); j++)
    if (id[ans[u][j]] == 0) dfs(ans[u][j]);
}
int main() {
  ios::sync_with_stdio(false);
  for (int i = 2; i <= 20000; i++)
    if (prime[i] == false) {
      for (int j = i + i; j <= 20000; j += i) prime[j] = true;
    }
  cin >> n;
  int nOdd = 0;
  for (int i = 1; i <= n; i++) {
    cin >> e[i];
    if (e[i] % 2 == 1) {
      nOdd++;
      ao.push_back(i);
    } else
      ae.push_back(i);
  }
  if (n % 2 == 1 || nOdd != n / 2)
    cout << "Impossible";
  else {
    s = 0;
    t = n + 1;
    for (int i = 0; i < ao.size(); i++) {
      add(s, ao[i], 2);
    }
    for (int i = 0; i < ae.size(); i++) {
      add(ae[i], t, 2);
    }
    for (int i = 0; i < ao.size(); i++)
      for (int j = 0; j < ae.size(); j++)
        if (prime[e[ao[i]] + e[ae[j]]] == false) {
          add(ao[i], ae[j], 1);
        }
    while (findPath()) incFlow();
    if (flow != n)
      cout << "Impossible";
    else {
      for (int i = 0; i < ao.size(); i++) {
        int u = ao[i];
        for (int j = 0; j < a[u].size(); j++)
          if (a[u][j].f == 1) {
            int v = a[u][j].v;
            ans[u].push_back(v);
            ans[v].push_back(u);
          }
      }
      for (int i = 1; i <= n; i++)
        if (id[i] == 0) {
          nId++;
          dfs(i);
        }
      cout << nId << "\n";
      for (int i = 1; i <= nId; i++) {
        cout << res[i].size() << " ";
        for (int j = 0; j < res[i].size(); j++) cout << res[i][j] << " ";
        cout << "\n";
      }
    }
  }
  return 0;
}