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 int inf = 0x3f3f3f3f;
const long long infLL = 0x3f3f3f3f3f3f3f3fLL;
const int maxv = 20000 + 5;
bool isp[maxv];
int prime[maxv], sz;
void gen_prime() {
  sz = 0;
  memset(isp, true, sizeof(isp));
  isp[0] = isp[1] = false;
  for (int i = 2; i < maxv; ++i) {
    if (isp[i]) prime[sz++] = i;
    for (int j = 0, t; j < sz && (t = prime[j] * i) < maxv; ++j) {
      isp[t] = false;
      if (!(i % prime[j])) break;
    }
  }
}
const int maxn = 200 + 5;
const int maxe = 100000 + 5;
class ISAP {
  int n, psz;
  struct Edge {
    int v, r;
    Edge *next, *cp;
  } epool[maxe], *e[maxn];
  int s, t, dis[maxn], gap[maxn];
  int aug(int u, int m) {
    if (u == t) return m;
    int f = 0;
    for (Edge *i = e[u]; i; i = i->next)
      if (i->r && dis[u] == dis[i->v] + 1) {
        int d = aug(i->v, min(i->r, m));
        i->r -= d, i->cp->r += d;
        m -= d, f += d;
        if (dis[s] == n || !m) return f;
      }
    int d = f ? min(dis[u] + 2, n) : n;
    for (Edge *i = e[u]; i; i = i->next)
      if (i->r) d = min(d, dis[i->v] + 1);
    --gap[dis[u]] ? ++gap[dis[u] = d] : dis[s] = n;
    return f;
  }

 public:
  void init(int n) {
    this->n = n, psz = 0;
    memset(e, 0, sizeof(e));
  }
  void add_edge(int u, int v, int w) {
    Edge *i = epool + psz;
    i->v = v, i->r = w, i->next = e[u];
    e[u] = i;
    i->cp = epool + (psz++ ^ 1);
    if (psz & 1) add_edge(v, u, 0);
  }
  int max_flow(int src, int trg) {
    s = src, t = trg;
    memset(dis, 0, sizeof(dis));
    memset(gap, 0, sizeof(gap));
    gap[0] = n;
    int flow = 0;
    while (dis[s] != n) flow += aug(s, inf);
    return flow;
  }
  bool vis[maxn];
  void dfs(int u, int o, vector<int> &vec) {
    vis[u] = true;
    vec.push_back(u);
    for (Edge *i = e[u]; i; i = i->next) {
      if (i->r ^ o) continue;
      int v = i->v;
      if (!vis[v]) dfs(v, o ^ 1, vec);
    }
  }
} grp;
int n;
int a[maxn];
vector<int> vec[maxn];
int main() {
  gen_prime();
  scanf("%d", &n);
  int s = 0, t = n + 1;
  grp.init(t + 1);
  for (int i = (1); i <= (n); ++i) {
    scanf("%d", &a[i]);
    if (a[i] & 1)
      grp.add_edge(s, i, 2);
    else
      grp.add_edge(i, t, 2);
  }
  for (int i = (1); i <= (n); ++i)
    if (a[i] & 1)
      for (int j = (1); j <= (n); ++j)
        if (isp[a[i] + a[j]]) grp.add_edge(i, j, 1);
  if (grp.max_flow(s, t) != n) {
    puts("Impossible");
  } else {
    sz = 0;
    grp.vis[s] = grp.vis[t] = true;
    for (int u = (1); u <= (n); ++u)
      if ((a[u] & 1) && !grp.vis[u]) grp.dfs(u, 0, vec[sz++]);
    printf("%d\n", sz);
    for (int i = 0; i < (sz); ++i) {
      printf("%d", (int)vec[i].size());
      for (__typeof(vec[i].begin()) it = vec[i].begin(); it != vec[i].end();
           ++it)
        printf(" %d", *it);
      puts("");
    }
  }
  return 0;
}