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 maxn = 1024;
const int INF = 1e9;
int n;
int a[maxn], odds;
struct edge {
  int to, cap, flow;
  int back;
  edge() : back(-1) {}
  edge(int t, int c) : to(t), cap(c), flow(0), back(-1) {}
};
int source, sink;
vector<edge> g[maxn];
bool is_prime(const int &x) {
  for (int i = 2; i * i <= x; ++i)
    if (x % i == 0) return 0;
  return 1;
}
void add_edge(const int &f, const int &t, const int &c) {
  edge e = edge(t, c), b = edge(f, 0);
  e.back = g[t].size(), b.back = g[f].size();
  g[f].push_back(e), g[t].push_back(b);
}
void build_graph() {
  source = n + 1, sink = n + 2;
  for (int i = int(1); i <= int(n); ++i)
    if (a[i] & 1)
      add_edge(source, i, 2);
    else
      add_edge(i, sink, 2);
  for (int i = int(1); i <= int(n); ++i) {
    if (!(a[i] & 1)) continue;
    for (int j = int(1); j <= int(n); ++j) {
      if (a[j] & 1) continue;
      if (is_prime(a[i] + a[j])) add_edge(i, j, 1);
    }
  }
}
int d[maxn];
queue<int> q;
bool BFS() {
  for (int i = int(1); i <= int(sink); ++i) d[i] = -1;
  d[source] = 0;
  q.push(source);
  while (q.size()) {
    int x = q.front();
    q.pop();
    for (auto e : g[x]) {
      if (d[e.to] == -1 && e.flow < e.cap) {
        d[e.to] = d[x] + 1;
        q.push(e.to);
      }
    }
  }
  return d[sink] != -1;
}
int head[maxn];
int DFS(const int &x, const int &cur_flow = INF) {
  if (x == sink || !cur_flow) return cur_flow;
  while (head[x] < g[x].size()) {
    edge &e = g[x][head[x]++];
    if (d[e.to] != d[x] + 1) continue;
    int pushed_flow = DFS(e.to, min(cur_flow, e.cap - e.flow));
    if (pushed_flow) {
      edge &back = g[e.to][e.back];
      e.flow += pushed_flow;
      back.flow -= pushed_flow;
      assert(back.back + 1 == head[x]);
      return pushed_flow;
    }
  }
  return 0;
}
int Dinic() {
  int max_flow = 0;
  while (BFS()) {
    for (int i = int(1); i <= int(sink); ++i) head[i] = 0;
    while (int new_flow = DFS(source)) max_flow += new_flow;
  }
  return max_flow;
}
bool used[maxn];
vector<vector<int> > res;
void dfs(const int &x, const int &p = -1) {
  used[x] = 1;
  res.back().push_back(x);
  for (auto e : g[x]) {
    if (e.to == p || e.to > n) continue;
    if (!e.flow || used[e.to]) continue;
    dfs(e.to, x);
  }
}
void restore_ans() {
  for (int i = int(1); i <= int(n); ++i) {
    if (used[i]) continue;
    res.push_back(vector<int>(0));
    dfs(i);
  }
  printf("%d\n", res.size());
  for (auto &v : res) {
    printf("%d ", v.size());
    for (auto x : v) printf("%d ", x);
    putchar('\n');
  }
}
int main() {
  scanf("%d", &n);
  for (int i = int(1); i <= int(n); ++i) {
    scanf("%d", &a[i]);
    odds += (a[i] & 1);
  }
  if (odds != n - odds) {
    printf("Impossible\n");
    return 0;
  }
  build_graph();
  if (Dinic() != odds * 2) {
    printf("Impossible\n");
    return 0;
  }
  restore_ans();
  return 0;
}