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 maxnode = 1000 + 5;
const int maxedge = 40000 + 5;
const int oo = 1000000000;
int node, src, dest, nedge;
int head[maxnode], point[maxedge], next1[maxedge], flow[maxedge], capa[maxedge];
int dist[maxnode], Q[maxnode], work[maxnode];
void init(int _node, int _src, int _dest) {
  node = _node;
  src = _src;
  dest = _dest;
  for (int i = 0; i < node; i++) head[i] = -1;
  nedge = 0;
}
void addedge(int u, int v, int c1, int c2) {
  point[nedge] = v, capa[nedge] = c1, flow[nedge] = 0, next1[nedge] = head[u],
  head[u] = (nedge++);
  point[nedge] = u, capa[nedge] = c2, flow[nedge] = 0, next1[nedge] = head[v],
  head[v] = (nedge++);
}
bool dinic_bfs() {
  memset(dist, 255, sizeof(dist));
  dist[src] = 0;
  int sizeQ = 0;
  Q[sizeQ++] = src;
  for (int cl = 0; cl < sizeQ; cl++)
    for (int k = Q[cl], i = head[k]; i >= 0; i = next1[i])
      if (flow[i] < capa[i] && dist[point[i]] < 0) {
        dist[point[i]] = dist[k] + 1;
        Q[sizeQ++] = point[i];
      }
  return dist[dest] >= 0;
}
int dinic_dfs(int x, int exp) {
  if (x == dest) return exp;
  for (int &i = work[x]; i >= 0; i = next1[i]) {
    int v = point[i], tmp;
    if (flow[i] < capa[i] && dist[v] == dist[x] + 1 &&
        (tmp = dinic_dfs(v, min(exp, capa[i] - flow[i]))) > 0) {
      flow[i] += tmp;
      flow[i ^ 1] -= tmp;
      return tmp;
    }
  }
  return 0;
}
int dinic_flow() {
  int result = 0;
  while (dinic_bfs()) {
    for (int i = 0; i < node; i++) work[i] = head[i];
    while (1) {
      int delta = dinic_dfs(src, oo);
      if (delta == 0) break;
      result += delta;
    }
  }
  return result;
}
int flag[20005], prime[20005], count1, vf[205];
void getprime(int n) {
  int i, j;
  memset(flag, 0, sizeof(flag));
  for (i = 2; i <= n; i++) {
    if (flag[i] == 0) prime[++count1] = i;
    for (j = 1; j <= count1 && i * prime[j] <= n; j++) {
      flag[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
struct thanks {
  int a, num;
} p[205];
bool cmp(thanks x, thanks y) { return x.a % 2 > y.a % 2; }
vector<int> v[205], ans[205];
int vt;
void dfs(int x) {
  vf[x] = 1;
  int e = v[x].size();
  for (int i = 0; i < e; i++) {
    int y = v[x][i];
    if (vf[y] == 0) {
      dfs(y);
    }
  }
  ans[vt].push_back(x);
}
int main() {
  int i, j, n, m;
  getprime(20000);
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &p[i].a);
    p[i].num = i;
  }
  sort(p + 1, p + n + 1, cmp);
  if (n % 2 || p[n / 2].a % 2 == 0 || p[n / 2 + 1].a % 2 == 1)
    printf("Impossible\n");
  else {
    init(n + 2, 0, n + 1);
    for (i = 1; i <= n / 2; i++) addedge(0, i, 2, 0);
    for (i = n / 2 + 1; i <= n; i++) addedge(i, n + 1, 2, 0);
    for (i = 1; i <= n / 2; i++) {
      for (j = n / 2 + 1; j <= n; j++) {
        if (flag[p[i].a + p[j].a] == 0) {
          addedge(i, j, 1, 0);
        }
      }
    }
    if (dinic_flow() == n) {
      for (i = 1; i <= n / 2; i++) {
        for (j = head[i]; j != -1; j = next1[j]) {
          if (flow[j] == 1) {
            v[p[i].num].push_back(p[point[j]].num);
            v[p[point[j]].num].push_back(p[i].num);
          }
        }
      }
      for (i = 1; i <= n; i++) {
        if (vf[i] == 0) {
          vt++;
          dfs(i);
        }
      }
      printf("%d\n", vt);
      for (i = 1; i <= vt; i++) {
        int e = ans[i].size();
        printf("%d ", e);
        for (j = 0; j < e; j++) {
          if (j != e - 1)
            printf("%d ", ans[i][j]);
          else
            printf("%d\n", ans[i][j]);
        }
      }
    } else
      printf("Impossible\n");
  }
  return 0;
}