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 int MAXN = 400;
struct edge {
  int from, to, cap, flow;
};
int ptr[MAXN], q[MAXN], d[MAXN], s, f, n, m;
vector<edge> e;
vector<int> g[MAXN];
vector<int> gg[MAXN];
void add_edge(int a, int b, int c) {
  edge e1 = {a, b, c, 0};
  edge e2 = {b, a, 0, 0};
  g[a].push_back((int)e.size());
  e.push_back(e1);
  g[b].push_back((int)e.size());
  e.push_back(e2);
}
bool bfs() {
  int qt = 0, qh = 0;
  memset(d, -1, sizeof d);
  q[qt++] = s;
  d[s] = 0;
  while (qt > qh && d[f] == -1) {
    int v = q[qh++];
    for (int i = 0; i < g[v].size(); ++i) {
      int idx = g[v][i], to = e[idx].to;
      if (d[to] == -1 && e[idx].cap > e[idx].flow) {
        d[to] = d[v] + 1;
        q[qt++] = to;
      }
    }
  }
  return d[f] != -1;
}
int dfs(int v, int flow) {
  if (!flow) return 0;
  if (v == f) return flow;
  for (; ptr[v] < g[v].size(); ++ptr[v]) {
    int idx = g[v][ptr[v]], to = e[idx].to;
    if (d[to] != d[v] + 1) continue;
    int pushed = dfs(to, min(flow, e[idx].cap - e[idx].flow));
    if (pushed) {
      e[idx].flow += pushed;
      e[idx ^ 1].flow -= pushed;
      return pushed;
    }
  }
  return 0;
}
int dinic() {
  int flow = 0;
  for (;;) {
    if (!bfs()) break;
    memset(ptr, 0, sizeof ptr);
    while (int pushed = dfs(s, (int)1e9)) flow += pushed;
  }
  return flow;
}
bool isSimple[1000000];
void build_simple(int n) {
  for (int i = 1; i <= n; ++i) isSimple[i] = true;
  isSimple[1] = false;
  for (int i = 2; i <= n; ++i) {
    if (isSimple[i]) {
      int j = i + i;
      while (j <= n) {
        isSimple[j] = false;
        j += i;
      }
    }
  }
}
int a[MAXN];
char used[MAXN];
vector<int> ans[MAXN];
void dfss(int v, int c) {
  if (used[v]) return;
  used[v] = true;
  ans[c].push_back(v);
  for (int i = 0; i < gg[v].size(); ++i) {
    int to = gg[v][i];
    dfss(to, c);
  }
}
int main() {
  build_simple(20000);
  cin >> n;
  s = 0;
  f = n + 1;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] % 2 == 0)
      add_edge(s, i, 2);
    else
      add_edge(i, f, 2);
    for (int j = 1; j < i; ++j)
      if (isSimple[a[i] + a[j]]) {
        int c1 = i, c2 = j;
        if (a[i] % 2 == 1) swap(c1, c2);
        add_edge(c1, c2, 1);
      }
  }
  int flow = dinic();
  if (flow != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 0; i < e.size(); ++i)
    if (e[i].from != s && e[i].to != f && e[i].flow > 0) {
      gg[e[i].from].push_back(e[i].to);
      gg[e[i].to].push_back(e[i].from);
    }
  int idx = 0;
  for (int i = 1; i <= n; ++i)
    if (!used[i]) dfss(i, idx++);
  cout << idx << endl;
  for (int i = 0; i < idx; ++i) {
    cout << ans[i].size() << " ";
    for (int j = 0; j < ans[i].size(); ++j) cout << ans[i][j] << " ";
    cout << endl;
  }
  return 0;
}
