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.
#include <bits/stdc++.h>
using namespace std;
const char imp[] = "Impossible";
struct dinic {
  static const int N = 202;
  static const int M = 20400;
  static const int inf = 1 << 29;
  int nodes, source, sink, nedge;
  int to[M], flow[M], cap[M], next[M];
  int head[N], work[N], Q[N], dist[N];
  void init(int _n, int _src, int _snk) {
    nodes = _n;
    source = _src, sink = _snk;
    memset(head, -1, sizeof head);
    nedge = 0;
  }
  void addEdge(int u, int v, int f) {
    to[nedge] = v, cap[nedge] = f, flow[nedge] = 0, next[nedge] = head[u],
    head[u] = nedge++;
    to[nedge] = u, cap[nedge] = f, flow[nedge] = f, next[nedge] = head[v],
    head[v] = nedge++;
  }
  bool bfs() {
    memset(dist, -1, sizeof dist);
    dist[source] = 0;
    int b = 0, e = 0;
    Q[e++] = source;
    while (b < e) {
      int u = Q[b++];
      for (int i = head[u]; i >= 0; i = next[i]) {
        if (dist[to[i]] == -1 && flow[i] < cap[i]) {
          dist[to[i]] = dist[u] + 1;
          Q[e++] = to[i];
        }
      }
    }
    return dist[sink] >= 0;
  }
  int dfs(int u, int f) {
    if (f == 0) return 0;
    if (u == sink) return f;
    for (int &i = work[u]; i >= 0; i = next[i]) {
      int v = to[i], fl;
      if (dist[v] == dist[u] + 1 && (fl = dfs(v, min(f, cap[i] - flow[i])))) {
        flow[i] += fl;
        flow[i ^ 1] -= fl;
        return fl;
      }
    }
    return 0;
  }
  int maxFlow() {
    int f = 0;
    while (bfs()) {
      memcpy(work, head, sizeof head);
      while (int fl = dfs(source, inf)) {
        f += fl;
      }
    }
    return f;
  }
} obj;
bool ps[22222];
int n, a[200];
vector<int> parity[2];
vector<int> adj[200];
bool was[200];
void dfs(int u, vector<int> &table) {
  if (was[u]) return;
  was[u] = 1;
  table.push_back(parity[u / (n / 2)][u % (n / 2)]);
  for (int v : adj[u]) {
    dfs(v, table);
  }
}
int main() {
  ps[0] = ps[1] = 1;
  for (int i = 2; i * i <= 22222; ++i) {
    if (ps[i] == 0) {
      for (int j = i * i; j <= 22222; j += i) {
        ps[j] = 1;
      }
    }
  }
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
    parity[a[i] & 1].push_back(a[i]);
  }
  if (parity[0].size() != parity[1].size()) {
    puts(imp);
    return 0;
  }
  obj.init(n + 2, n, n + 1);
  for (int i = 0; i < (int)parity[0].size(); ++i) {
    obj.addEdge(obj.source, i, 2);
  }
  for (int i = 0; i < (int)parity[1].size(); ++i) {
    obj.addEdge(parity[0].size() + i, obj.sink, 2);
  }
  for (int i = 0; i < (int)parity[0].size(); ++i) {
    for (int j = 0; j < (int)parity[1].size(); ++j) {
      if (!ps[parity[0][i] + parity[1][j]]) {
        obj.addEdge(i, parity[0].size() + j, 1);
      }
    }
  }
  int res = obj.maxFlow();
  if (res != n) {
    puts(imp);
    return 0;
  }
  for (int i = n + n; i < obj.nedge; i += 2) {
    if (obj.flow[i] == obj.cap[i]) {
      adj[obj.to[i ^ 1]].push_back(obj.to[i]);
      adj[obj.to[i]].push_back(obj.to[i ^ 1]);
    }
  }
  vector<vector<int> > ans;
  for (int i = 0; i < n; ++i) {
    if (was[i] == 0) {
      ans.push_back(vector<int>());
      dfs(i, ans.back());
    }
  }
  printf("%d\n", (int)ans.size());
  for (auto &table : ans) {
    printf("%d", (int)table.size());
    for (int v : table) {
      int i = find(a, a + n, v) - a;
      printf(" %d", i + 1);
      a[i] = -1;
    }
    putchar('\n');
  }
  return 0;
}
