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 = 210;
const int maxm = (1e4 + 10) * 2;
const int INF = 1e9;
struct Edge {
  int to, reverseIndex, cap, flow;
};
int n, m, s, t, maxFlow, dis[maxn], a[maxn];
vector<Edge> g[maxn];
vector<pair<int, int> > pari[2];
bool mark[maxm], mark1[maxn];
vector<vector<int> > ans;
vector<int> temp;
bool bfs() {
  for (int i = 0; i < maxn; i++) dis[i] = INF;
  queue<int> q;
  q.push(s);
  dis[s] = 0;
  while (q.size() > 0) {
    int v = q.front();
    q.pop();
    for (int i = 0; i < g[v].size(); i++) {
      Edge x = g[v][i];
      int u = x.to;
      if (dis[u] == INF && x.flow < x.cap) {
        dis[u] = dis[v] + 1;
        q.push(u);
      }
    }
  }
  return (dis[t] != INF);
}
int dfs(int v, int f) {
  if (v == t) return f;
  for (int i = 0; i < g[v].size(); i++) {
    Edge &x = g[v][i];
    int u = x.to;
    if (x.cap <= x.flow) continue;
    if (dis[u] == dis[v] + 1) {
      int tmp = dfs(u, min(f, x.cap - x.flow));
      if (tmp > 0) {
        x.flow += tmp;
        g[u][x.reverseIndex].flow -= tmp;
        return tmp;
      }
    }
  }
  return 0;
}
void dinic() {
  while (bfs()) {
    while (int tmp = dfs(s, INF)) maxFlow += tmp;
  }
}
void dfs(int v) {
  mark1[v] = true;
  temp.push_back(v);
  for (int i = 0; i < g[v].size(); i++) {
    Edge e = g[v][i];
    if ((e.flow == 1 || e.flow == -1) && !mark1[e.to] && e.to != s &&
        e.to != t) {
      dfs(e.to);
      break;
    }
  }
}
int main() {
  mark[1] = 1;
  for (int i = 2; i < maxm; i++)
    if (!mark[i])
      for (int j = i * 2; j < maxm; j += i) mark[j] = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    pari[a[i] % 2].push_back(make_pair(a[i], i));
  }
  if (pari[0].size() != pari[1].size()) {
    cout << "Impossible" << endl;
    return 0;
  }
  s = 0, t = n + 1;
  for (int i = 0; i < pari[0].size(); i++) {
    Edge e, e1;
    e.to = pari[0][i].second;
    e.reverseIndex = g[pari[0][i].second].size();
    e.cap = 2;
    e.flow = 0;
    e1.to = s;
    e1.reverseIndex = g[s].size();
    e1.cap = 0;
    e1.flow = 0;
    g[s].push_back(e);
    g[pari[0][i].second].push_back(e1);
    e.to = pari[1][i].second;
    e.reverseIndex = g[pari[1][i].second].size();
    e.cap = 0;
    e.flow = 0;
    e1.to = t;
    e1.reverseIndex = g[t].size();
    e1.cap = 2;
    e1.flow = 0;
    g[t].push_back(e);
    g[pari[1][i].second].push_back(e1);
  }
  for (int i = 0; i < pari[0].size(); i++) {
    for (int j = 0; j < pari[1].size(); j++) {
      if (!mark[pari[0][i].first + pari[1][j].first]) {
        Edge e, e1;
        e.to = pari[0][i].second;
        e.reverseIndex = g[pari[0][i].second].size();
        e.cap = 0;
        e.flow = 0;
        e1.to = pari[1][j].second;
        e1.reverseIndex = g[pari[1][j].second].size();
        e1.cap = 1;
        e1.flow = 0;
        g[pari[1][j].second].push_back(e);
        g[pari[0][i].second].push_back(e1);
      }
    }
  }
  dinic();
  if (maxFlow != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  vector<vector<int> > ans;
  for (int i = 0; i < pari[0].size(); i++) {
    int v = pari[0][i].second;
    if (!mark1[v]) {
      temp.clear();
      mark1[v] = 1;
      temp.push_back(v);
      for (int j = 0; j < g[v].size(); j++) {
        Edge e = g[v][j];
        if (e.flow == 1 && !mark1[e.to] && e.to != s && e.to != t) {
          dfs(e.to);
          ans.push_back(temp);
          break;
        }
      }
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].size() << ' ';
    for (int j = 0; j < ans[i].size(); j++) cout << ans[i][j] << ' ';
    cout << endl;
  }
}
