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 = (int)5e3 + 100;
const int maxM = (int)1e6 + 100;
const int mod = (int)1e9 + 7;
const int maxlog = (int)20;
const int P = mod;
int n, a[maxn], d[maxn], cnt = 1, second = 1;
vector<pair<int, int> > t[2];
int check(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
struct edge {
  int v, u, c, first;
} x;
vector<edge> e;
int ptr[maxn];
vector<int> g[maxn];
inline void add(int v, int u, int c) {
  e.push_back({v, u, c, 0});
  e.push_back({u, v, 0, 0});
  g[v].push_back(e.size() - 2);
  g[u].push_back(e.size() - 1);
}
inline bool bfs(int second, int t) {
  queue<int> q;
  q.push(second);
  for (int i = 1; i <= t; ++i) d[i] = -1;
  d[second] = 0;
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (auto id : g[v]) {
      int to = e[id].u;
      if (e[id].first == e[id].c) continue;
      if (d[to] == -1) {
        d[to] = d[v] + 1;
        q.push(to);
      }
    }
  }
  return d[t] != -1;
}
long long dfs(int v, int t, long long push = INT_MAX) {
  if (!push || v == t) return push;
  for (int &id = ptr[v]; id < g[v].size(); ++id) {
    int td = g[v][id];
    int to = e[td].u;
    if (e[td].first == e[td].c) continue;
    if (d[to] != d[v] + 1) continue;
    long long pushed = dfs(to, t, min(push, 1ll * e[td].c - e[td].first));
    if (pushed) {
      e[td].first += pushed;
      e[td ^ 1].first -= pushed;
      return pushed;
    }
  }
  return 0;
}
int get(int second, int t) {
  int res = 0;
  while (bfs(second, t)) {
    while (long long pushed = dfs(second, t)) res += pushed;
    memset(ptr, 0, sizeof ptr);
  }
  return res;
}
int used[maxn], first;
vector<vector<int> > T;
vector<int> cur;
void dfs1(int v) {
  used[v] = 1;
  if (v <= n) {
    cur.push_back(t[0][v - 1].second);
  } else {
    cur.push_back(t[1][v - n - 1].second);
  }
  for (auto to : g[v]) {
    x = e[to];
    if (x.u != second && x.u != n * 2 + 1 && x.first != 0 && !used[x.u]) {
      dfs1(x.u);
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    t[a[i] % 2].push_back(make_pair(a[i], i));
  }
  if (t[1].size() != t[0].size()) {
    cout << "Impossible";
    return 0;
  }
  n = t[0].size();
  second = 2 * t[0].size() + 2;
  for (int i = 0; i < t[0].size(); i++) add(second, i + 1, 2);
  first = t[0].size() * 2 + 1;
  int n = t[0].size();
  for (int i = 0; i < t[0].size(); i++) add(i + 1 + n, first, 2);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      int cur = t[0][i].first + t[1][j].first;
      if (check(cur)) {
        add(i + 1, j + n + 1, 1);
      }
    }
  }
  int MxFlow = get(second, first);
  int ans = 0;
  if (MxFlow == n + n) {
    for (int i = 1; i <= n; i++) {
      cur.clear();
      if (!used[i]) {
        ans++;
        dfs1(i);
        T.push_back(cur);
      }
    }
    cout << T.size() << endl;
    for (auto i : T) {
      cout << i.size() << " ";
      for (int j : i) cout << j << " ";
      cout << endl;
    }
  } else {
    cout << "Impossible";
  }
}