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>
int min(int x, int y) { return (x < y) ? x : y; }
int get_int() {
  int t = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') {
    t = t * 10 + ch - '0';
    ch = getchar();
  }
  return t;
}
struct Edge {
  int from, to, cap, flow;
  Edge(int from_ = 0, int to_ = 0, int cap_ = 0, int flow_ = 0) {
    from = from_;
    to = to_;
    cap = cap_;
    flow = flow_;
    return;
  }
};
int lp = 0, f[210], nxt[40010];
Edge edge[40010];
inline void add(int x, int y, int z) {
  edge[lp] = Edge(x, y, z, 0);
  nxt[lp] = f[x];
  f[x] = lp++;
  return;
}
int n, rec[210];
int l, r, q[210], p[210], a[210];
inline void qset() {
  l = 1;
  r = 0;
  return;
}
inline void qadd(int x) {
  q[++r] = x;
  return;
}
inline bool qempty() { return l > r; }
inline int qtop() { return q[l]; }
inline void qpop() {
  l++;
  return;
}
int lans = 0, ans[210][210], vis[210];
bool is_prime(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) {
      return false;
    }
  return true;
}
void dfs(int x) {
  ans[lans][0]++;
  ans[lans][ans[lans][0]] = x;
  vis[x] = 1;
  for (int t = f[x]; t != -1; t = nxt[t])
    if ((vis[edge[t].to] == 0) && (edge[t].flow != 0)) {
      dfs(edge[t].to);
      break;
    }
  return;
}
int main() {
  n = get_int();
  for (int i = 1; i <= n; i++) rec[i] = get_int();
  memset(f, 255, sizeof(f));
  for (int i = 1; i <= n; i++)
    if (rec[i] % 2 == 1)
      add(0, i, 2), add(i, 0, 0);
    else
      add(i, n + 1, 2), add(n + 1, i, 0);
  for (int i = 1; i <= n; i++)
    if (rec[i] % 2 == 1)
      for (int j = 1; j <= n; j++)
        if (rec[j] % 2 == 0)
          if (is_prime(rec[i] + rec[j])) add(i, j, 1), add(j, i, 0);
  int flow = 0;
  for (;;) {
    memset(a, 0, sizeof(a));
    a[0] = 2000000000;
    qset();
    qadd(0);
    while (!qempty()) {
      int x = qtop();
      qpop();
      for (int t = f[x]; t != -1; t = nxt[t]) {
        Edge &e = edge[t];
        if (a[e.to]) continue;
        if (e.flow >= e.cap) continue;
        a[e.to] = min(a[x], e.cap - e.flow);
        p[e.to] = t;
        qadd(e.to);
      }
      if (a[n + 1]) break;
    }
    if (!a[n + 1]) break;
    flow += a[n + 1];
    for (int t = n + 1; t != 0; t = edge[p[t]].from) {
      edge[p[t]].flow += a[n + 1];
      edge[p[t] ^ 1].flow -= a[n + 1];
    }
  }
  if (flow != n) {
    printf("Impossible\n");
    return 0;
  }
  memset(vis, 0, sizeof(vis));
  memset(ans, 0, sizeof(ans));
  vis[0] = 1;
  vis[n + 1] = 1;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      lans++;
      dfs(i);
    }
  printf("%d\n", lans);
  for (int i = 1; i <= lans; i++) {
    printf("%d ", ans[i][0]);
    for (int j = 1; j <= ans[i][0]; j++) printf("%d ", ans[i][j]);
    printf("\n");
  }
  return 0;
}
