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;
struct dat {
  int to, rev, f, cap;
  dat(int to = 0, int rev = 0, int f = 0, int cap = 0)
      : to(to), rev(rev), f(f), cap(cap) {}
};
vector<dat> v[21000];
vector<int> arr[21000];
int dist[21000], work[21000], vis[21000], pa[21000], A[21000][10], deg[21000],
    a[21000];
queue<int> q;
void add(int x, int y, int cap) {
  int n = v[x].size();
  int m = v[y].size();
  v[x].push_back(dat(y, m, 0, cap));
  v[y].push_back(dat(x, n, 0, 0));
}
int n;
bool dinic_bfs() {
  for (int i = 0; i <= n + 1; i++) dist[i] = 10100000;
  dist[0] = 0;
  while (!q.empty()) q.pop();
  q.push(0);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = 0; i < (int)v[x].size(); i++) {
      if (v[x][i].f == v[x][i].cap) continue;
      int y = v[x][i].to;
      if (dist[y] != 10100000) continue;
      dist[y] = dist[x] + 1;
      q.push(y);
    }
  }
  return dist[n + 1] != 10100000;
}
int dinic_dfs(int x, int f) {
  if (x == n + 1) return f;
  for (; work[x] < (int)v[x].size(); work[x]++) {
    dat a = v[x][work[x]];
    if (a.f == a.cap) continue;
    int y = a.to;
    if (dist[y] != dist[x] + 1) continue;
    int d = dinic_dfs(y, min(f, a.cap - a.f));
    if (!d) continue;
    v[x][work[x]].f += d;
    v[y][a.rev].f -= d;
    return d;
  }
  return 0;
}
int main() {
  vis[1] = 1;
  for (int i = 2; i <= 21000; i++)
    if (!vis[i]) {
      for (int j = 2; j * i <= 21000; j++) vis[i * j] = 1;
    }
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int so = 0;
  int de = n + 1;
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2 == 0) {
      add(so, i, 2);
      for (int j = 1; j <= n; j++) {
        if (vis[a[i] + a[j]]) continue;
        add(i, j, 1);
      }
    } else
      add(i, de, 2);
  }
  int ans = 0;
  while (dinic_bfs()) {
    for (int i = 0; i <= n + 1; i++) work[i] = 0;
    int d = dinic_dfs(so, 10100000);
    if (!d) break;
    ans += d;
  }
  if (ans != n) {
    puts("Impossible");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < v[i].size(); j++) {
      dat aa = v[i][j];
      if (aa.cap != 1) continue;
      if (aa.f != aa.cap) continue;
      int x = aa.to;
      A[i][deg[i]++] = x;
      A[x][deg[x]++] = i;
    }
  for (int i = 1; i <= n; i++) vis[i] = 0;
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      vis[i] = 1;
      ++cnt;
      arr[cnt].clear();
      int x = i;
      while (1) {
        arr[cnt].push_back(x);
        bool ok = false;
        for (int j = 0; j < deg[x]; j++) {
          int y = A[x][j];
          if (vis[y]) continue;
          ok = true;
          vis[y] = 1;
          x = y;
          break;
        }
        if (!ok) break;
      }
    }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; i++) {
    printf("%d", arr[i].size());
    for (int j = 0; j < (int)arr[i].size(); j++) printf(" %d", arr[i][j]);
    puts("");
  }
  return 0;
}