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 = 1e9;
struct edge {
  int x, y, cap, flow;
};
struct DinicFlow {
  vector<edge> e;
  vector<int> cur, d;
  vector<vector<int> > adj;
  int source, sink, n;
  DinicFlow() {}
  DinicFlow(int v, int s, int t) {
    n = v, source = s, sink = t;
    cur = vector<int>(n + 1);
    d = vector<int>(n + 1);
    adj = vector<vector<int> >(n + 1);
  }
  void addEdge(int from, int to, int cap) {
    edge e1 = {from, to, cap, 0};
    edge e2 = {to, from, 0, 0};
    adj[from].push_back(e.size());
    e.push_back(e1);
    adj[to].push_back(e.size());
    e.push_back(e2);
  }
  int bfs() {
    queue<int> q;
    for (int i = 0; i <= n; ++i) d[i] = -1;
    q.push(source);
    d[source] = 0;
    while (!q.empty() and d[sink] < 0) {
      int x = q.front();
      q.pop();
      for (int i = 0; i < (int)adj[x].size(); ++i) {
        int id = adj[x][i], y = e[id].y;
        if (d[y] < 0 and e[id].flow < e[id].cap) {
          q.push(y);
          d[y] = d[x] + 1;
        }
      }
    }
    return d[sink] >= 0;
  }
  int dfs(int x, int flow) {
    if (!flow) return 0;
    if (x == sink) return flow;
    for (; cur[x] < (int)adj[x].size(); ++cur[x]) {
      int id = adj[x][cur[x]], y = e[id].y;
      if (d[y] != d[x] + 1) continue;
      int pushed = dfs(y, min(flow, e[id].cap - e[id].flow));
      if (pushed) {
        e[id].flow += pushed;
        e[id ^ 1].flow -= pushed;
        return pushed;
      }
    }
    return 0;
  }
  long long maxFlow() {
    long long flow = 0;
    while (bfs()) {
      for (int i = 0; i <= n; ++i) cur[i] = 0;
      while (int pushed = dfs(source, inf)) {
        flow += 1ll * pushed;
      }
    }
    return flow;
  }
};
int arr[307];
vector<int> g[307], ans[307];
bool vt[307];
bool is_pm(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
void dfs(int idx, int fg) {
  vt[idx] = 1;
  ans[fg].push_back(idx);
  for (auto a : g[idx]) {
    if (!vt[a]) {
      dfs(a, fg);
      return;
    }
  }
}
int main() {
  int i, j, k, n, m, x, y, z, second = 0, so = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++)
    scanf("%d", &arr[i]), arr[i] % 2 == 0 ? second++ : so++;
  if (second != so) {
    puts("Impossible");
    return 0;
  }
  int s = 0, t = 2 * n + 1;
  DinicFlow dinic(t + 1, s, t);
  for (i = 1; i <= n; i++) {
    if (arr[i] % 2)
      dinic.addEdge(s, i, 2);
    else
      dinic.addEdge(n + i, t, 2);
    for (j = 1; j <= n; j++) {
      int sum = arr[i] + arr[j];
      if (is_pm(sum) and arr[i] % 2) dinic.addEdge(i, n + j, 1);
    }
  }
  long long res = dinic.maxFlow();
  if (res != n) {
    puts("Impossible");
    return 0;
  }
  for (auto v : dinic.e) {
    x = v.x;
    y = v.y - n;
    if (x > s and x <= n and v.y > n and v.y < t and v.flow == 1) {
      g[x].push_back(y);
      g[y].push_back(x);
    }
  }
  res = 0;
  for (i = 1; i <= n; i++) {
    if (!vt[i]) dfs(i, res), res++;
  }
  cout << res << endl;
  ;
  for (i = 0; i < res; i++) {
    printf("%d ", (int)ans[i].size());
    for (auto tmp : ans[i]) printf("%d ", tmp);
    puts("");
  }
  return 0;
}