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 = (int)1e9;
const long long INF = (long long)5e18;
const int MOD = 998244353;
int _abs(int x) { return x < 0 ? -x : x; }
int add(int x, int y) {
  x += y;
  return x >= MOD ? x - MOD : x;
}
int sub(int x, int y) {
  x -= y;
  return x < 0 ? x + MOD : x;
}
void Add(int &x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
}
void Sub(int &x, int y) {
  x -= y;
  if (x < 0) x += MOD;
}
void Mul(int &x, int y) { x = (long long)(x) * (y) % MOD; }
int qpow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = (long long)(ret) * (x) % MOD;
    x = (long long)(x) * (x) % MOD;
    y >>= 1;
  }
  return ret;
}
void checkmin(int &x, int y) {
  if (x > y) x = y;
}
void checkmax(int &x, int y) {
  if (x < y) x = y;
}
void checkmin(long long &x, long long y) {
  if (x > y) x = y;
}
void checkmax(long long &x, long long y) {
  if (x < y) x = y;
}
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return x * f;
}
const int N = 1001;
const int M = 500005;
int first[N], nxt[M], point[M], w[M], cur[N], e = 0, tot = 0;
int S, T, a[N], id[N][N];
namespace Flow {
void add_edge(int x, int y, int z) {
  point[e] = y;
  w[e] = z;
  nxt[e] = first[x];
  first[x] = e++;
}
void add(int x, int y, int z) {
  add_edge(x, y, z);
  add_edge(y, x, 0);
  id[x][y] = e - 1;
  id[y][x] = e - 1;
}
int vis[N], dep[N];
bool bfs() {
  queue<int> q;
  while (!q.empty()) q.pop();
  for (int i = 1; i <= tot; i++) vis[i] = 0;
  vis[S] = 1;
  q.push(S);
  dep[S] = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = first[u]; i != -1; i = nxt[i])
      if (w[i]) {
        int to = point[i];
        if (vis[to]) continue;
        dep[to] = dep[u] + 1;
        vis[to] = 1;
        q.push(to);
      }
  }
  return vis[T];
}
int dfs(int u, int flow) {
  if (u == T) return flow;
  int ret = flow;
  for (int &i = cur[u]; i != -1; i = nxt[i])
    if (w[i]) {
      int to = point[i];
      if (dep[to] != dep[u] + 1) continue;
      int tmp = dfs(to, min(w[i], ret));
      if (tmp) w[i] -= tmp, w[i ^ 1] += tmp, ret -= tmp;
      if (!ret) break;
    }
  return flow - ret;
}
int Dinic() {
  int ret = 0;
  while (bfs()) {
    for (int i = 1; i <= tot; i++) cur[i] = first[i];
    ret += dfs(S, inf);
  }
  return ret;
}
}  // namespace Flow
int n, bl[M];
void init() {
  memset(first, -1, sizeof(first));
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 2; i < M; i++) {
    if (!bl[i])
      for (int j = i + i; j < M; j += i) bl[j] = 1;
  }
  tot = n;
  S = ++tot;
  T = ++tot;
  for (int i = 1; i <= n; i++) {
    if (a[i] & 1) {
      Flow::add(S, i, 2);
      for (int j = 1; j <= n; j++)
        if (!bl[a[i] + a[j]]) {
          Flow::add(i, j, 1);
        }
    } else
      Flow::add(i, T, 2);
  }
}
int vis[N];
vector<vector<int> > ans;
int main() {
  init();
  int F = Flow::Dinic();
  if (F != n) {
    puts("Impossible");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      vector<int> v;
      int x = i;
      while (1) {
        vis[x] = 1;
        v.push_back(x);
        int to = -1;
        for (int j = 1; j <= n; j++)
          if (w[id[x][j]] && !vis[j]) {
            to = j;
            break;
          }
        if (to == -1) break;
        x = to;
      }
      ans.push_back(v);
    }
  printf("%d\n", (int)(ans).size());
  for (auto &v : ans) {
    printf("%d ", (int)(v).size());
    for (auto &u : v) printf("%d ", u);
    puts("");
  }
  return 0;
}