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 = 1e9;
const int MOD = 1e9 + 7;
int a[509], n;
struct node {
  int id, num;
  bool operator<(const node &rhs) const {
    if (num % 2 != rhs.num % 2) {
      return num % 2 < rhs.num % 2;
    } else {
      return id < rhs.id;
    }
  }
} p[509];
struct Edge {
  int v, cap, next;
} edge[5000009];
int head[509], cur[509], d[509], gap[509], Q[509], pre[509];
int src, des, tot;
void addedge(int u, int v, int cap) {
  edge[tot].v = v;
  edge[tot].cap = cap;
  edge[tot].next = head[u];
  head[u] = tot++;
  edge[tot].v = u;
  edge[tot].cap = 0;
  edge[tot].next = head[v];
  head[v] = tot++;
}
void init() {
  memset(head, -1, sizeof(head));
  tot = 0;
}
void bfs() {
  int h = 0, t = 0;
  for (int i = 0; i < n; i++) {
    d[i] = INF;
    gap[i] = 0;
  }
  Q[t++] = des;
  d[des] = 0;
  gap[0] = 1;
  while (t != h) {
    int u = Q[h++];
    for (int e = head[u]; e != -1; e = edge[e].next) {
      if (!edge[e ^ 1].cap || d[edge[e].v] < INF) continue;
      d[edge[e].v] = d[u] + 1;
      gap[d[edge[e].v]]++;
      Q[t++] = edge[e].v;
    }
  }
}
int sap() {
  bfs();
  int u, flow = 0;
  for (int i = 0; i < n; i++) cur[i] = head[i];
  u = src;
  while (d[src] < n) {
    if (u == des) {
      int augflow = INF;
      for (int v = src; v != des; v = edge[cur[v]].v) {
        augflow = min(augflow, edge[cur[v]].cap);
      }
      for (int v = src; v != des; v = edge[cur[v]].v) {
        edge[cur[v]].cap -= augflow;
        edge[cur[v] ^ 1].cap += augflow;
      }
      flow += augflow;
      u = src;
    }
    int e;
    for (e = cur[u]; e != -1; e = edge[e].next) {
      if (edge[e].cap > 0 && d[u] == d[edge[e].v] + 1) break;
    }
    if (e != -1) {
      cur[u] = e;
      pre[edge[e].v] = e ^ 1;
      u = edge[e].v;
    } else {
      gap[d[u]]--;
      if (gap[d[u]] == 0) break;
      cur[u] = head[u];
      int minh = n;
      for (int e = head[u]; e != -1; e = edge[e].next) {
        if (edge[e].cap) {
          minh = min(minh, d[edge[e].v]);
        }
      }
      d[u] = minh + 1;
      gap[d[u]]++;
      if (u != src) u = edge[pre[u]].v;
    }
  }
  return flow;
}
bool check(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
vector<int> G[509], ans[509];
int vis[509], cnt;
void DFS(int u) {
  vis[u] = 1;
  ans[cnt].push_back(u);
  for (int i = 0; i < (int)G[u].size(); i++) {
    int v = G[u][i];
    if (!vis[v]) {
      DFS(v);
    }
  }
}
int main() {
  int N;
  cin >> N;
  int odd = 0, eve = 0;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
    if (a[i] & 1)
      odd++;
    else
      eve++;
    p[i].num = a[i];
    p[i].id = i;
  }
  if (odd != eve) {
    puts("Impossible");
    return 0;
  } else {
    src = 0;
    des = N + 1;
    n = des + 1;
    memset(head, -1, sizeof(head));
    tot = 0;
    sort(p + 1, p + 1 + N);
    for (int i = 1; i <= N / 2; i++) {
      for (int j = N / 2 + 1; j <= N; j++) {
        if (check(p[i].num + p[j].num)) {
          addedge(i, j, 1);
        }
      }
    }
    for (int i = 1; i <= N / 2; i++) addedge(src, i, 2);
    for (int i = N / 2 + 1; i <= N; i++) addedge(i, des, 2);
    int flow = sap();
    if (flow != N) {
      puts("Impossible");
    } else {
      for (int i = N / 2 + 1; i <= N; i++) {
        for (int e = head[i]; e != -1; e = edge[e].next) {
          int v = edge[e].v;
          if (edge[e].cap) {
            if (v >= 1 && v <= N / 2) {
              G[p[i].id].push_back(p[v].id);
              G[p[v].id].push_back(p[i].id);
            }
          }
        }
      }
      cnt = 0;
      for (int i = 1; i <= N; i++) {
        if (!vis[i]) {
          DFS(i);
          cnt++;
        }
      }
      printf("%d\n", cnt);
      for (int i = 0; i < cnt; i++) {
        printf("%d", (int)ans[i].size());
        for (int j = 0; j < (int)ans[i].size(); j++) printf(" %d", ans[i][j]);
        puts("");
      }
    }
  }
  return 0;
}