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;
using namespace std;
struct Edge {
  int u, v, flow, next;
} edge[2000100];
int head[4001], nEdge;
int dis[4001], cur[4001];
int que[4001], front, tail;
int stk[4001], top;
void init() {
  memset(head, -1, sizeof(head));
  nEdge = 0;
}
void addEdge(int a, int b, int f) {
  edge[nEdge].u = a;
  edge[nEdge].v = b;
  edge[nEdge].flow = f;
  edge[nEdge].next = head[a];
  head[a] = nEdge++;
  edge[nEdge].u = b;
  edge[nEdge].v = a;
  edge[nEdge].flow = 0;
  edge[nEdge].next = head[b];
  head[b] = nEdge++;
}
bool bfs(int src, int dst) {
  int i, p, cur;
  memset(dis, -1, sizeof(dis));
  front = tail = 0;
  dis[src] = 0;
  que[tail++] = src;
  while (front < tail) {
    cur = que[front++];
    for (i = head[cur]; ~i; i = edge[i].next) {
      if (edge[i].flow && dis[p = edge[i].v] < 0) {
        dis[p] = dis[cur] + 1;
        if (p == dst) return true;
        que[tail++] = p;
      }
    }
  }
  return false;
}
int dinic(int v, int src, int dst) {
  int i, x = src, p, nowFlow, totalFlow = 0;
  while (bfs(src, dst)) {
    top = 0;
    for (i = 0; i < v; ++i) cur[i] = head[i];
    while (1) {
      if (x == dst) {
        nowFlow = 1000000000;
        for (i = 0; i < top; ++i) {
          if (edge[stk[i]].flow < nowFlow) {
            nowFlow = edge[stk[i]].flow;
            p = i;
          }
        }
        totalFlow += nowFlow;
        for (i = 0; i < top; ++i) {
          edge[stk[i]].flow -= nowFlow;
          edge[stk[i] ^ 1].flow += nowFlow;
        }
        top = p;
        x = edge[stk[top]].u;
      }
      for (i = cur[x]; ~i; i = edge[i].next) {
        if (edge[i].flow && dis[edge[i].v] == dis[x] + 1) break;
      }
      cur[x] = i;
      if (~i) {
        stk[top++] = i;
        x = edge[i].v;
      } else {
        if (!top) break;
        dis[x] = -1;
        x = edge[stk[--top]].u;
      }
    }
  }
  return totalFlow;
}
vector<vector<int> > ans;
vector<int> ed[400];
int vis[400];
int a[301];
int pr[110000];
int main() {
  int i, j, n, m;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 2; i <= 22222; i++) pr[i] = 1;
  for (i = 2; i <= 22222; i++)
    if (pr[i])
      for (j = i + i; j <= 22222; j += i) pr[j] = 0;
  init();
  for (i = 1; i <= n; i++) {
    if (a[i] % 2 == 0)
      addEdge(0, i, 2);
    else
      addEdge(i, n + 1, 2);
  }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++)
      if (a[i] % 2 == 0 && a[j] % 2 != 0)
        if (pr[a[i] + a[j]]) addEdge(i, j, 1);
  int ss = dinic(n + 2, 0, n + 1);
  if (ss != n) {
    puts("Impossible");
    return 0;
  }
  for (i = 0; i < nEdge; i += 2) {
    int u = edge[i].v;
    if (u != n + 1 && edge[i ^ 1].v != 0 && edge[i].flow == 0) {
      ed[edge[i ^ 1].v].push_back(u);
      ed[u].push_back(edge[i ^ 1].v);
    }
  }
  for (i = 1; i <= n; i++)
    if (!vis[i]) {
      vector<int> tmp;
      int last = ed[i][0];
      int now = i;
      do {
        int cur;
        if (ed[now][0] == last)
          cur = ed[now][1];
        else
          cur = ed[now][0];
        tmp.push_back(cur);
        vis[cur] = 1;
        last = now;
        now = cur;
      } while (now != i);
      ans.push_back(tmp);
    }
  int sz = ans.size();
  printf("%d\n", sz);
  for (i = 0; i < sz; i++) {
    printf("%d", ans[i].size());
    for (j = 0; j < ans[i].size(); j++) printf(" %d", ans[i][j]);
    puts("");
  }
  return 0;
}