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 N = 505;
int n, cnt = 1, a[N], head[N];
int f[20005], prime[20005], cnt_p;
int vis[N], q[N], d[N], gap[N], p[N], mem[N][3], vv[N];
vector<int> v[N];
struct edge {
  int y, w, next;
} e[200005];
void addedge(int x, int y, int w) {
  e[++cnt] = edge{y, w, head[x]};
  head[x] = cnt;
  e[++cnt] = edge{x, 0, head[y]};
  head[y] = cnt;
}
void init() {
  f[1] = 1;
  for (int i = 2; i <= 20000; i++) {
    if (!f[i]) prime[++cnt_p] = i;
    for (int j = 1; j <= cnt_p && i * prime[j] <= 20000; j++) {
      f[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
void bfs(int t) {
  for (int i = 0; i <= n + 1; i++) d[i] = n;
  int l = 1, r = 0;
  q[++r] = t;
  vis[t] = 1;
  d[t] = 0;
  while (l <= r) {
    int x = q[l++];
    for (int i = head[x]; i; i = e[i].next)
      if (!e[i].w && !vis[e[i].y]) {
        d[e[i].y] = d[x] + 1;
        q[++r] = e[i].y;
        vis[e[i].y] = 1;
      }
  }
  for (int i = 0; i <= n + 1; i++) gap[d[i]]++;
}
int sap(int s, int t) {
  bfs(t);
  int x = s, cnt = 0, ret = 0;
  while (d[s] < n) {
    bool f = 0;
    for (int i = head[x]; i; i = e[i].next)
      if (e[i].w && d[x] == d[e[i].y] + 1) {
        p[++cnt] = i;
        x = e[i].y;
        if (x == t) {
          int flow = 1e9;
          for (int i = 1; i <= cnt; i++) flow = min(flow, e[p[i]].w);
          for (int i = 1; i <= cnt; i++) {
            e[p[i]].w -= flow;
            e[p[i] ^ 1].w += flow;
          }
          ret += flow;
          x = s;
          cnt = 0;
        }
        f = 1;
        break;
      }
    if (f) continue;
    gap[d[x]]--;
    if (!gap[d[x]]) break;
    d[x] = n;
    for (int i = head[x]; i; i = e[i].next)
      if (e[i].w) d[x] = min(d[x], d[e[i].y] + 1);
    gap[d[x]]++;
    if (x != s) {
      cnt--;
      if (cnt)
        x = e[p[cnt]].y;
      else
        x = s;
    }
  }
  return ret;
}
void dfs(int k, int x) {
  v[k].push_back(x);
  vv[x] = 1;
  if (!vv[mem[x][1]])
    dfs(k, mem[x][1]);
  else if (!vv[mem[x][2]])
    dfs(k, mem[x][2]);
}
int main() {
  init();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int f1 = 0, f2 = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2 == 0) {
      addedge(i, n + 1, 2);
      f1 += 2;
    } else {
      addedge(0, i, 2);
      f2 += 2;
      for (int j = 1; j <= n; j++)
        if (!f[a[i] + a[j]]) addedge(i, j, 1);
    }
  }
  if (f1 != f2) {
    printf("Impossible\n");
    return 0;
  }
  int flow = sap(0, n + 1);
  if (flow < f1) {
    printf("Impossible\n");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    for (int j = head[i]; j; j = e[j].next) {
      if (e[j].y == n + 1 || e[j].y == 0) continue;
      if (a[i] % 2 == 1) {
        if (!e[j].w) mem[i][++mem[i][0]] = e[j].y;
      } else {
        if (e[j].w) mem[i][++mem[i][0]] = e[j].y;
      }
    }
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (!vv[i]) {
      dfs(i, i);
      ans++;
    }
  printf("%d\n", ans);
  for (int i = 1; i <= n; i++)
    if (v[i].size()) {
      printf("%d ", v[i].size());
      for (int j = 0; j < v[i].size(); j++) printf("%d ", v[i][j]);
      printf("\n");
    }
  return 0;
}
