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 = 0x3f3f3f3f;
int n, S, T, a[210], last[210], _last[210], num = 1, ans;
int ss[20010], vis[20010];
int dep[210], que[210], tou, wei;
vector<int> G[210], H[210];
struct EDGE {
  int ver, len, next;
} edge[40010];
inline int read() {
  int x = 0, w = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    w |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return w ? -x : x;
}
void prepare() {
  vis[1] = vis[0] = 1;
  for (int i = 2; i <= 20000; i++) {
    if (!vis[i]) ss[++ss[0]] = i;
    for (int j = 1; i * ss[j] <= 20000; j++) {
      vis[i * ss[j]] = 1;
      if (i % ss[j] == 0) break;
    }
  }
}
void add(int U, int V, int L) {
  edge[++num] = (EDGE){V, L, last[U]};
  last[U] = num;
  edge[++num] = (EDGE){U, 0, last[V]};
  last[V] = num;
}
bool bfs() {
  memcpy(last, _last, sizeof last);
  memset(dep, 0, sizeof dep);
  dep[que[tou = wei = 1] = S] = 1;
  while (tou <= wei) {
    int x = que[tou++];
    for (int i = last[x], y = edge[i].ver; i;
         i = edge[i].next, y = edge[i].ver) {
      if (dep[y] || !edge[i].len) continue;
      dep[y] = dep[x] + 1;
      que[++wei] = y;
      if (y == T) return 1;
    }
  }
  return 0;
}
int dinic(int x, int flow) {
  if (x == T) return flow;
  int liu = flow;
  for (int &i = last[x], y; i; i = edge[i].next)
    if (dep[y = edge[i].ver] == dep[x] + 1 && edge[i].len) {
      int temp = dinic(y, min(edge[i].len, liu));
      if (!temp) dep[y] = 0;
      edge[i].len -= temp;
      edge[i ^ 1].len += temp;
      liu -= temp;
      if (!liu) return flow;
    }
  return flow - liu;
}
int main() {
  prepare();
  n = read();
  S = n + 1;
  T = S + 1;
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      if (vis[a[i] + a[j]]) continue;
      if (a[i] & 1)
        add(i, j, 1);
      else
        add(j, i, 1);
    }
  for (int i = 1; i <= n; i++)
    if (a[i] & 1)
      add(S, i, 2);
    else
      add(i, T, 2);
  int temp = 0;
  memcpy(_last, last, sizeof last);
  while (bfs())
    while ((temp = dinic(S, inf))) ans += temp;
  if (ans ^ n) return printf("Impossible\n"), 0;
  ans = 0;
  for (int x = 1; x <= n; x++)
    if (a[x] & 1)
      for (int i = last[x], y = edge[i].ver; i;
           i = edge[i].next, y = edge[i].ver)
        if (edge[i ^ 1].len) {
          if (y == S) continue;
          G[x].emplace_back(y);
          G[y].emplace_back(x);
        }
  memset(vis, 0, sizeof vis);
  for (int x = 1; x <= n; x++)
    if (!vis[x]) {
      ans++;
      int y = x;
      while (!vis[y]) {
        vis[y] = 1;
        H[ans].emplace_back(y);
        for (int z : G[y])
          if (!vis[z]) {
            y = z;
            break;
          }
      }
    }
  printf("%d\n", ans);
  for (int i = 1; i <= ans; i++) {
    printf("%d ", int(H[i].size()));
    for (int x : H[i]) printf("%d ", x);
    printf("\n");
  }
}