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 evp;
int odp;
int idx[250];
int a[250];
int res[250][250];
vector<int> adj[250];
int mf;
int f;
vector<int> p;
int s, t;
int idxr[250];
vector<int> adjr[250];
vector<vector<int> > ans;
vector<int> tbl;
bool vis2[250];
bool isPrime(int n) {
  if (n == 1) return 0;
  if (n == 2) return 1;
  for (int i = 3; i * i <= n; i += 2)
    if (n % i == 0) return 0;
  return 1;
}
void augment(int v, int minEdge) {
  if (v == s) {
    f = minEdge;
    return;
  } else if (p[v] != -1) {
    augment(p[v], min(minEdge, res[p[v]][v]));
    res[p[v]][v] -= f;
    res[v][p[v]] += f;
  }
}
void fillTable(int v) {
  if (vis2[v]) return;
  vis2[v] = 1;
  tbl.push_back(v);
  for (int i = int(0); i <= int(adjr[v].size() - 1); i++) fillTable(adjr[v][i]);
}
int main() {
  int n;
  scanf("%d", &n);
  if (n % 2 == 1) {
    printf("Impossible\n");
    return 0;
  }
  evp = n / 2;
  for (int i = int(0); i <= int(n - 1); i++) {
    cin >> a[i];
    if (a[i] % 2)
      idx[i] = ++odp;
    else
      idx[i] = ++evp;
  }
  if (odp != n / 2) {
    printf("Impossible\n");
    return 0;
  }
  memset((res), 0, sizeof(res));
  for (int i = int(0); i <= int(n - 1); i++) {
    if (a[i] % 2) {
      res[0][idx[i]] = 2;
      adj[0].push_back(idx[i]);
      adj[idx[i]].push_back(0);
      for (int j = int(0); j <= int(n - 1); j++) {
        if (a[j] % 2 == 0 && isPrime(a[i] + a[j]))
          res[idx[i]][idx[j]] = 1, adj[idx[i]].push_back(idx[j]),
          adj[idx[j]].push_back(idx[i]);
      }
    } else {
      res[idx[i]][n + 1] = 2;
      adj[idx[i]].push_back(n + 1);
      adj[n + 1].push_back(idx[i]);
    }
  }
  s = 0;
  t = n + 1;
  mf = 0;
  while (1) {
    f = 0;
    bitset<250> vis;
    vis[0] = true;
    queue<int> q;
    q.push(0);
    p.assign(250, -1);
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      if (u == t) break;
      for (int j = 0; j < (int)adj[u].size(); j++) {
        int v = adj[u][j];
        if (res[u][v] > 0 && !vis[v]) vis[v] = true, q.push(v), p[v] = u;
      }
    }
    augment(t, 2000000000);
    if (f == 0) break;
    mf += f;
  }
  if (mf != n) {
    printf("Impossible\n");
    return 0;
  }
  for (int i = int(0); i <= int(n - 1); i++) idxr[idx[i]] = i;
  for (int i = int(1); i <= int(n / 2); i++) {
    for (int j = int(n / 2); j <= int(n); j++) {
      if (res[j][i] > 0)
        adjr[idxr[j]].push_back(idxr[i]), adjr[idxr[i]].push_back(idxr[j]);
    }
  }
  memset((vis2), 0, sizeof(vis2));
  for (int i = int(0); i <= int(n - 1); i++) {
    if (!vis2[i]) {
      tbl.clear();
      fillTable(i);
      ans.push_back(tbl);
    }
  }
  printf("%d\n", ans.size());
  for (int i = int(0); i <= int(ans.size() - 1); i++) {
    printf("%d", ans[i].size());
    for (int j = int(0); j <= int(ans[i].size() - 1); j++)
      printf(" %d", ans[i][j] + 1);
    printf("\n");
  }
  return 0;
}