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.
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1005;
const int MAXM = 100005;
const int INF = 0x3f3f3f3f;
struct Edge {
  int to, next, cap, flow;
} edge[MAXM];
int tot;
int head[MAXN];
int gap[MAXN], dep[MAXN], pre[MAXN], cur[MAXN];
void init() {
  tot = 0;
  memset(head, -1, sizeof(head));
}
void addedge(int u, int v, int w, int rw = 0) {
  edge[tot].to = v;
  edge[tot].cap = w;
  edge[tot].next = head[u];
  edge[tot].flow = 0;
  head[u] = tot++;
  edge[tot].to = u;
  edge[tot].cap = rw;
  edge[tot].next = head[v];
  edge[tot].flow = 0;
  head[v] = tot++;
}
int sap(int st, int ed, int N) {
  memset(gap, 0, sizeof(gap));
  memset(dep, 0, sizeof(dep));
  memcpy(cur, head, sizeof(head));
  int u = st;
  pre[u] = -1;
  gap[0] = N;
  int ans = 0;
  while (dep[st] < N) {
    if (u == ed) {
      int Min = INF;
      for (int i = pre[u]; i != -1; i = pre[edge[i ^ 1].to])
        if (Min > edge[i].cap - edge[i].flow) Min = edge[i].cap - edge[i].flow;
      for (int i = pre[u]; i != -1; i = pre[edge[i ^ 1].to]) {
        edge[i].flow += Min;
        edge[i ^ 1].flow -= Min;
      }
      u = st;
      ans += Min;
      continue;
    }
    bool flag = 0;
    int v;
    for (int i = cur[u]; i != -1; i = edge[i].next) {
      v = edge[i].to;
      if (edge[i].cap - edge[i].flow && dep[v] + 1 == dep[u]) {
        flag = 1;
        cur[u] = pre[v] = i;
        break;
      }
    }
    if (flag) {
      u = v;
      continue;
    }
    int Min = N;
    for (int i = head[u]; i != -1; i = edge[i].next)
      if (edge[i].cap - edge[i].flow && dep[edge[i].to] < Min) {
        Min = dep[edge[i].to];
        cur[u] = i;
      }
    gap[dep[u]]--;
    if (!gap[dep[u]]) return ans;
    dep[u] = Min + 1;
    gap[dep[u]]++;
    if (u != st) u = edge[pre[u] ^ 1].to;
  }
  return ans;
}
int cnt, a[MAXN], now[MAXN];
vector<int> e[MAXN];
bool vis[MAXN];
queue<int> ans[MAXN];
bool is_prime(int k) {
  if (k == 1) return 0;
  for (int i = 2; i <= (int)sqrt(k); i++)
    if (k % i == 0) return 0;
  return 1;
}
void dfs(int u) {
  vis[u] = 1;
  ans[cnt].push(u);
  for (int i = 0; i < e[u].size(); i++) {
    int v = e[u][i];
    if (!vis[v]) dfs(v);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  init();
  for (int i = 1; i <= n; i++) {
    if (a[i] & 1)
      addedge(0, i, 2);
    else
      addedge(i, n + 1, 2);
  }
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (is_prime(a[i] + a[j])) {
        if (a[i] & 1)
          addedge(i, j, 1);
        else
          addedge(j, i, 1);
      }
  if (sap(0, n + 1, n + 2) != n)
    printf("Impossible");
  else {
    for (int i = 0; i < tot; i += 2)
      if (edge[i].flow == edge[i].cap)
        if (edge[i].to >= 1 && edge[i].to <= n && edge[i ^ 1].to >= 1 &&
            edge[i ^ 1].to <= n) {
          e[edge[i].to].push_back(edge[i ^ 1].to);
          e[edge[i ^ 1].to].push_back(edge[i].to);
        }
    for (int i = 1; i <= n; i++)
      if (!vis[i]) {
        cnt++;
        dfs(i);
      }
    printf("%d\n", cnt);
    for (int i = 1; i <= cnt; i++) {
      printf("%d", ans[i].size());
      while (!ans[i].empty()) {
        printf(" %d", ans[i].front());
        ans[i].pop();
      }
      printf("\n");
    }
  }
  return 0;
}
