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;
long long max(long long a, long long b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}
long long min(long long a, long long b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}
struct P {
  double x, y;
  P() {}
  P(int x, int y) : x(double(x)), y(double(y)) {}
  P(double x, double y) : x(x), y(y) {}
  P operator+(const P &a) const { return P(x + a.x, y + a.y); }
  P operator-(const P &a) const { return P(x - a.x, y - a.y); }
  double operator^(const P &a) const { return x * a.x + y * a.y; }
  void in() { scanf("%lf%lf", &x, &y); }
  void out() { printf("REQUIRED %.7f %.7f\n", x, y); }
  double dist(P a, P b) {
    return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
  }
  double sqdist(P a, P b) {
    return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
  }
};
int n, m, h;
int a[301];
int p[20001];
int nxt[400000], rev[400000], dir[400000], w[400000];
int T;
int lvl[400000], q[400000], top, tail;
void insert(int a, int b, int c) {
  nxt[++h] = nxt[a];
  nxt[a] = h;
  dir[h] = b;
  w[h] = c;
  rev[h] = h + 1;
  nxt[++h] = nxt[b];
  nxt[b] = h;
  dir[h] = a;
  w[h] = 0;
  rev[h] = h - 1;
}
bool BFS() {
  top = tail = 1;
  for (int i = (0); i <= (T); i++) lvl[i] = -1;
  lvl[0] = 0;
  q[top++] = 0;
  while (top > tail) {
    int u = q[tail++];
    for (int po = nxt[u]; po > 0; po = nxt[po])
      if (w[po] && lvl[dir[po]] == -1) {
        lvl[dir[po]] = lvl[u] + 1;
        q[top++] = dir[po];
      }
  }
  return (lvl[T] != -1);
}
int DFS(int u, int f) {
  if (u == T) return f;
  if (f == 0) return 0;
  int z = f;
  for (int po = nxt[u]; po > 0; po = nxt[po])
    if (w[po] && lvl[dir[po]] == lvl[u] + 1) {
      int q = DFS(dir[po], min(z, w[po]));
      z -= q;
      w[po] -= q;
      w[rev[po]] += q;
    }
  if (z == f) lvl[u] = -2;
  return f - z;
}
int MaxFlow() {
  int ans = 0;
  while (BFS()) {
    int x;
    while (x = DFS(0, 10000000)) ans += x;
  }
  return ans;
}
int c1, c2, e[301], o[301];
int bs[301], be[301][301];
int od[301];
int visit[301];
void Q(int id, int u) {
  if (u == 0 || u == T) return;
  visit[u] = 1;
  bs[id]++;
  be[id][bs[id]] = od[u];
  if (u <= n / 2)
    for (int po = nxt[u]; po > 0; po = nxt[po]) {
      if (w[po] == 0 && visit[dir[po]] == 0) Q(id, dir[po]);
    }
  else
    for (int po = nxt[u]; po > 0; po = nxt[po]) {
      if (w[po] == 1 && visit[dir[po]] == 0) Q(id, dir[po]);
    }
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2) {
      o[++c2] = a[i];
      od[c2] = i;
    } else {
      e[++c1] = a[i];
      od[c1 + n / 2] = i;
    }
  }
  if (c1 != c2) {
    puts("Impossible");
    return 0;
  }
  T = n + 1;
  for (int i = (0); i <= (T); i++) nxt[i] = -1;
  h = T;
  for (int i = (1); i <= (20000); i++) p[i] = 0;
  for (int i = (2); i <= (20000); i++)
    if (p[i] == 0) {
      for (int j = i + i; j <= 20000; j += i) p[j] = 1;
    }
  for (int i = (1); i <= (n / 2); i++) insert(0, i, 2);
  for (int i = (1); i <= (n / 2); i++) insert(i + n / 2, T, 2);
  for (int i = (1); i <= (n / 2); i++)
    for (int j = (1); j <= (n / 2); j++)
      if (p[o[i] + e[j]] == 0) insert(i, j + n / 2, 1);
  int w = MaxFlow();
  if (w != n) {
    puts("Impossible");
    return 0;
  }
  int cnt = 0;
  for (int i = (1); i <= (n); i++) visit[i] = 0;
  for (int i = (1); i <= (n / 2); i++)
    if (!visit[i]) Q(++cnt, i);
  printf("%d\n", cnt);
  for (int i = (1); i <= (cnt); i++) {
    printf("%d", bs[i]);
    for (int j = (1); j <= (bs[i]); j++) printf(" %d", be[i][j]);
    puts("");
  }
  return 0;
}