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;
typedef vector<int> vi;
typedef pair<int, int> ii;
int n, ans = 0, a[205], dis[205], cur[205], vis[205];
vi res[205];
struct EDGE {
  int tot, t[26817], nxt[26817], wt[26817], hd[205];
  EDGE() { tot = 1; }
  inline void add(int u, int v, int w) {
    t[++tot] = v;
    wt[tot] = w;
    nxt[tot] = hd[u];
    hd[u] = tot;
  }
} e, bi;
inline bool isP(int x) {
  for (int i = 2; i * i <= x; ++i)
    if (x % i == 0) return 0;
  return 1;
}
inline bool bfs() {
  int u, v;
  queue<int> q;
  memset(dis, 63, sizeof(dis));
  dis[0] = 0;
  q.push(0);
  while (!q.empty()) {
    u = q.front();
    q.pop();
    for (int i = e.hd[u]; i; i = e.nxt[i]) {
      v = e.t[i];
      if (e.wt[i] && dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        q.push(v);
      }
    }
  }
  return dis[n + 1] != 0x3f3f3f3f;
}
inline int dfs(int u, int lw) {
  if (u == n + 1) return lw;
  int v, gt, ret = 0;
  for (int &i = cur[u]; i; i = e.nxt[i]) {
    v = e.t[i];
    if (e.wt[i] && dis[v] == dis[u] + 1) {
      if (gt = dfs(v, min(lw, e.wt[i]))) {
        ret += gt;
        lw -= gt;
        e.wt[i] -= gt;
        e.wt[i ^ 1] += gt;
        if (!lw) break;
      }
    }
  }
  if (!ret) dis[u] = 0x3f3f3f3f;
  return ret;
}
inline int Dinic() {
  int mxf = 0;
  while (bfs()) {
    for (int i = 0; i <= n + 1; ++i) cur[i] = e.hd[i];
    mxf += dfs(0, 0x3f3f3f3f);
  }
  return mxf;
}
inline void dfs2(int u, int fa) {
  if (vis[u]) return;
  int v;
  vis[u] = 1;
  res[ans].push_back(u);
  for (int i = bi.hd[u]; i; i = bi.nxt[i]) {
    v = bi.t[i];
    if (v == fa) continue;
    dfs2(v, u);
  }
}
int main() {
  int mxf;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    if (a[i] & 1) {
      e.add(0, i, 2);
      e.add(i, 0, 0);
    } else {
      e.add(i, n + 1, 2);
      e.add(n + 1, i, 0);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (isP(a[i] + a[j])) {
        if (a[i] & 1) {
          e.add(i, j, 1);
          e.add(j, i, 0);
        } else {
          e.add(j, i, 1);
          e.add(i, j, 0);
        }
      }
    }
  }
  mxf = Dinic();
  if (mxf != n) {
    puts("Impossible");
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    if (a[i] & 1) {
      for (int j = e.hd[i]; j; j = e.nxt[j]) {
        if (e.t[j] && !e.wt[j]) {
          bi.add(i, e.t[j], 0);
          bi.add(e.t[j], i, 0);
        }
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (!vis[i]) {
      ++ans;
      dfs2(i, 0);
    }
  }
  printf("%d\n", ans);
  for (int i = 1; i <= ans; ++i) {
    printf("%d ", res[i].size());
    for (int j = 0; j < res[i].size(); ++j) {
      printf("%d ", res[i][j]);
    }
    putchar('\n');
  }
  return 0;
}