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 num = -1, cnt1 = 0, cnt2 = 0, t, n;
bool flag[22000], f[220], ff;
int num1[220], h[220], d[220], cur[220], ans[70][220];
struct node {
  int x, y, z, next, s;
} mp[88000];
struct node1 {
  int x, num;
} a1[220], a2[220];
void insert(int x, int y, int z, int s1, int s2) {
  mp[++num].x = x;
  mp[num].y = y;
  mp[num].z = z;
  mp[num].next = h[x];
  h[x] = num;
  mp[num].s = s1;
  mp[++num].x = y;
  mp[num].y = x;
  mp[num].z = 0;
  mp[num].next = h[y];
  h[y] = num;
  mp[num].s = s2;
}
void find() {
  memset(flag, true, sizeof(flag));
  flag[1] = false;
  for (int i = 2; i <= 200; i++)
    if (flag[i])
      for (int j = i * 2; j <= 20000; j += i) flag[j] = false;
}
bool bfs() {
  queue<int> q;
  q.push(0);
  memset(d, 0, sizeof(d));
  d[0] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = h[u]; i != -1; i = mp[i].next) {
      int v = mp[i].y;
      if (mp[i].z && !d[v]) {
        d[v] = d[u] + 1;
        q.push(v);
      }
    }
  }
  if (d[t]) return true;
  return false;
}
int dfs(int u, int s1) {
  if (u == t) return s1;
  int s2 = s1;
  for (int &i = cur[u]; i != -1; i = mp[i].next) {
    int v = mp[i].y;
    if (mp[i].z && d[v] == d[u] + 1) {
      int x = dfs(v, min(s1, mp[i].z));
      if (!x) d[v] = 0;
      mp[i].z -= x;
      mp[i ^ 1].z += x;
      s1 -= x;
      if (!s1) return s2;
    }
  }
  return s2 - s1;
}
void dfs1(int x, int u, int op) {
  ans[x][++num1[x]] = u;
  f[u] = false;
  for (int i = h[u]; i != -1; i = mp[i].next) {
    int v = mp[i].y;
    if (v != 0 && v != t && v != op)
      if ((mp[i ^ 1].z == 1 && mp[i].s % 2) ||
          (mp[i].z == 1 && mp[i].s % 2 == 0))
        if (f[v]) {
          dfs1(x, v, u);
          break;
        }
  }
}
int main() {
  find();
  scanf("%d", &n);
  memset(h, -1, sizeof(h));
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    if (x % 2)
      a1[++cnt1].x = x, a1[cnt1].num = i;
    else
      a2[++cnt2].x = x, a2[cnt2].num = i;
  }
  t = cnt1 + cnt2 + 1;
  for (int i = 1; i <= cnt1; i++)
    for (int j = 1; j <= cnt2; j++)
      if (flag[a1[i].x + a2[j].x])
        insert(a1[i].num, a2[j].num, 1, a1[i].x, a2[i].x);
  for (int i = 1; i <= cnt1; i++) insert(0, a1[i].num, 2, 0, a1[i].x);
  for (int i = 1; i <= cnt2; i++) insert(a2[i].num, t, 2, a2[i].x, 0);
  int s = 0;
  while (bfs()) {
    memcpy(cur, h, sizeof(cur));
    s += dfs(0, 0x7fffffff);
  }
  if (s != n) {
    printf("Impossible");
    return 0;
  }
  memset(f, true, sizeof(f));
  memset(num1, 0, sizeof(num1));
  cnt2 = 0;
  for (int i = 1; i <= n; i++)
    if (f[i]) dfs1(++cnt2, i, 0);
  printf("%d\n", cnt2);
  for (int i = 1; i <= cnt2; i++) {
    printf("%d ", num1[i]);
    for (int j = 1; j <= num1[i]; j++) printf("%d ", ans[i][j]);
    printf("\n");
  }
  return 0;
}