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 MN = 200005;
const int MOD = 1e9 + 7;
int n, m;
int A[MN];
const int ME = MN;
const int INF = 0x3f3f3f3f;
struct edge {
  int v, next, cap;
} E[ME * 2];
int vec[MN], NE;
int gap[MN], lev[MN], cur[MN], pre[MN], aug[MN];
void init(int n) {
  NE = 0;
  for (int i = 0; i <= n; i++) vec[i] = -1;
}
inline void addedge(int u, int v, int w = 1, int rw = 0) {
  E[NE].v = v, E[NE].cap = w, E[NE].next = vec[u], vec[u] = NE++;
  E[NE].v = u, E[NE].cap = rw, E[NE].next = vec[v], vec[v] = NE++;
}
int isap(int s, int e, int n) {
  int i, u = s, max_flow = 0;
  for (i = 0; i <= n; i++) lev[i] = gap[i] = 0, cur[i] = vec[i];
  pre[s] = -1;
  aug[s] = INF;
  while (lev[s] < n) {
    if (u == e) {
      int c = aug[e];
      max_flow += c;
      for (int v = pre[e]; v != -1; v = pre[v]) {
        i = cur[v];
        E[i].cap -= c;
        E[i ^ 1].cap += c;
        aug[E[i].v] -= c;
        if (E[i].cap == 0) u = v;
      }
      continue;
    }
    for (i = cur[u]; i != -1; i = E[i].next) {
      int v = E[i].v;
      if (E[i].cap > 0 && lev[u] == lev[v] + 1) {
        aug[v] = min(aug[u], E[i].cap);
        cur[u] = i;
        pre[v] = u;
        u = v;
        break;
      }
    }
    if (i == -1) {
      if (--gap[lev[u]] == 0) return max_flow;
      int mlev = n;
      for (i = vec[u]; i != -1; i = E[i].next)
        if (E[i].cap > 0) mlev = min(lev[E[i].v], mlev);
      gap[lev[u] = mlev + 1]++;
      cur[u] = vec[u];
      if (u != s) u = pre[u];
    }
  }
  return max_flow;
}
bool isprime(int a) {
  if (a == 1) return 0;
  for (int i = 2; i * i <= a; i++) {
    if (a % i == 0) return 0;
  }
  return 1;
}
vector<int> v[505], ANS[505];
bool vis[505];
void dfs(int u, int id) {
  if (u == 0 || u == n + 1) return;
  vis[u] = 1;
  ANS[id].push_back(u);
  for (int i = vec[u]; i != -1; i = E[i].next) {
    int v = E[i].v;
    if (vis[v]) continue;
    if (A[u] % 2) {
      if (E[i].cap != 1) {
        E[i].cap++;
        dfs(v, id);
      }
    } else {
      if (E[i].cap) {
        E[i].cap--;
        dfs(v, id);
      }
    }
  }
}
int main() {
  scanf("%d", &n);
  init(n + 123);
  for (int i = (1); i < (n + 1); ++i) {
    scanf("%d", &A[i]);
    if (A[i] & 1)
      addedge(0, i, 2);
    else
      addedge(i, n + 1, 2);
  }
  for (int i = (1); i < (n + 1); ++i) {
    if (A[i] & 1)
      for (int j = (1); j < (n + 1); ++j)
        if (isprime(A[i] + A[j])) addedge(i, j, 1);
  }
  int ans = isap(0, n + 1, n + 3);
  if (ans != n) {
    printf("Impossible\n");
    return 0;
  }
  ans = 0;
  for (int i = (1); i < (n + 1); ++i) {
    if (!vis[i]) dfs(i, ans++);
  }
  printf("%d\n", ans);
  for (int i = (0); i < (ans); ++i) {
    printf("%d ", ANS[i].size());
    for (int j = 0; j < ANS[i].size(); j++) printf("%d ", ANS[i][j]);
    printf("\n");
  }
  return 0;
}