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;
long pr[1 << 20];
long n, ar[1 << 20];
vector<long> l, r;
long used[1 << 20];
vector<long> comp;
vector<vector<long> > av;
struct edge {
  long a, b, cap, flow;
};
long N, s, t, d[1 << 20], ptr[1 << 20], q[1 << 20];
vector<edge> e;
vector<long> g[1 << 20];
vector<long> G[1 << 20];
void add_edge(long a, long b, long cap) {
  edge e1 = {a, b, cap, 0};
  edge e2 = {b, a, 0, 0};
  g[a].push_back(e.size());
  e.push_back(e1);
  g[b].push_back(e.size());
  e.push_back(e2);
}
bool bfs() {
  q[0] = s;
  long qh, qt;
  qh = 0;
  qt = 1;
  for (int i = 0; i <= N; i++) d[i] = -1;
  d[s] = 0;
  while (qh < qt && d[t] == -1) {
    long v = q[qh];
    ++qh;
    for (int i = 0; i < g[v].size(); i++) {
      long id = g[v][i];
      long to = e[id].b;
      if (d[to] == -1 && e[id].flow < e[id].cap) {
        q[qt] = to;
        ++qt;
        d[to] = d[v] + 1;
      }
    }
  }
  return (d[t] != -1);
}
long dfs(long v, long flow) {
  if (flow == 0 || v == t) return flow;
  for (; ptr[v] < g[v].size(); ++ptr[v]) {
    long id = g[v][ptr[v]];
    long to = e[id].b;
    if (d[to] != d[v] + 1) continue;
    if (e[id].flow == e[id].cap) continue;
    long pushed = dfs(to, min(flow, e[id].cap - e[id].flow));
    if (pushed) {
      e[id].flow += pushed;
      e[id ^ 1].flow -= pushed;
      return pushed;
    }
  }
  return 0;
}
long dinic() {
  long flow = 0;
  while (true) {
    if (!bfs()) break;
    for (int i = 0; i <= N; i++) ptr[i] = 0;
    while (true) {
      long pushed = dfs(s, 1000000);
      if (pushed == 0) break;
      flow += pushed;
    }
  }
  return flow;
}
void DFS(long v) {
  used[v] = 1;
  comp.push_back(v);
  for (int i = 0; i < G[v].size(); i++) {
    long id = G[v][i];
    if (used[id]) continue;
    DFS(id);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  pr[1] = 1;
  for (int i = 1; i <= 20000; i++)
    if (pr[i] == 0)
      for (int j = i * 2; j <= 20000; j += i) pr[j] = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ar[i];
    if (ar[i] % 2 == 0)
      l.push_back(i);
    else
      r.push_back(i);
  }
  for (int i = 0; i < l.size(); i++) add_edge(0, i + 1, 2);
  for (int i = 0; i < r.size(); i++) add_edge(i + l.size() + 1, n + 1, 2);
  for (int i = 0; i < l.size(); i++)
    for (int j = 0; j < r.size(); j++) {
      long a = ar[l[i]] + ar[r[j]];
      if (pr[a]) continue;
      add_edge(i + 1, j + l.size() + 1, 1);
    }
  s = 0;
  t = n + 1;
  N = t + 1;
  long res = dinic();
  if (res < n)
    cout << "Impossible" << endl;
  else {
    for (int i = 0; i < e.size(); i++) {
      int a = e[i].a;
      int b = e[i].b;
      int f = e[i].flow;
      if (a > 0 && a <= l.size() && b > l.size() && b <= l.size() + r.size() &&
          f > 0)
        G[l[a - 1]].push_back(r[b - l.size() - 1]),
            G[r[b - l.size() - 1]].push_back(l[a - 1]);
    }
    for (int i = 1; i <= n; i++)
      if (used[i] == 0) {
        comp.clear();
        DFS(i);
        av.push_back(comp);
      }
    cout << av.size() << endl;
    for (int i = 0; i < av.size(); i++) {
      cout << av[i].size();
      for (int j = 0; j < av[i].size(); j++) cout << " " << av[i][j];
      cout << endl;
    }
  }
  cin.get();
  cin.get();
  return 0;
}