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;
namespace Dinic {
const int MAXV = 1000100;
const int MAXE = 1000100;
const long long oo = 1e18;
int V, E;
int last[MAXV], dist[MAXV], curr[MAXV];
int next[MAXE], adj[MAXE];
long long cap[MAXE];
void init(int n) {
  V = n;
  E = 0;
  for (int i = (0); i < (V); ++i) last[i] = -1;
}
void edge(int x, int y, long long c1, long long c2) {
  adj[E] = y;
  cap[E] = c1;
  next[E] = last[x];
  last[x] = E++;
  adj[E] = x;
  cap[E] = c2;
  next[E] = last[y];
  last[y] = E++;
}
long long push(int x, int sink, long long flow) {
  if (x == sink) return flow;
  for (int &e = curr[x]; e != -1; e = next[e]) {
    int y = adj[e];
    if (cap[e] && dist[x] + 1 == dist[y])
      if (long long f = push(y, sink, min(flow, cap[e])))
        return cap[e] -= f, cap[e ^ 1] += f, f;
  }
  return 0;
}
long long run(int src, int sink) {
  long long ret = 0;
  for (;;) {
    for (int i = (0); i < (V); ++i) curr[i] = last[i];
    for (int i = (0); i < (V); ++i) dist[i] = -1;
    queue<int> Q;
    Q.push(src), dist[src] = 0;
    while (!Q.empty()) {
      int x = Q.front();
      Q.pop();
      for (int e = last[x]; e != -1; e = next[e]) {
        int y = adj[e];
        if (cap[e] && dist[y] == -1) Q.push(y), dist[y] = dist[x] + 1;
      }
    }
    if (dist[sink] == -1) break;
    while (long long f = push(src, sink, oo)) ret += f;
  }
  return ret;
}
}  // namespace Dinic
const int MAX = 2e4 + 10;
bool prime[MAX];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (int i = 2; i < MAX; i++) prime[i] = true;
  for (int i = 2; i < MAX; i++) {
    if (!prime[i]) continue;
    for (int j = 2 * i; j < MAX; j += i) prime[j] = false;
  }
  int n;
  cin >> n;
  vector<int> q(n);
  for (int i = 0; i < n; i++) cin >> q[i];
  Dinic::init(n + 2);
  for (int i = 0; i < n; i++) {
    if (q[i] % 2 == 0) {
      Dinic::edge(0, i + 1, 2, 0);
      for (int j = 0; j < n; j++)
        if (prime[q[i] + q[j]]) Dinic::edge(i + 1, j + 1, 1, 0);
    } else
      Dinic::edge(i + 1, n + 1, 2, 0);
  }
  if (Dinic::run(0, n + 1) != n) {
    cout << "Impossible\n";
    return 0;
  }
  vector<vector<int>> nxt(n + 1);
  for (int i = 0; i < Dinic::E; i += 2) {
    int x = Dinic::adj[i + 1], y = Dinic::adj[i];
    if (1 <= x && x <= n && 1 <= y && y <= n && Dinic::cap[i + 1] == 1) {
      nxt[x].push_back(y);
      nxt[y].push_back(x);
    }
  }
  vector<bool> vis(n + 1, false);
  vector<vector<int>> sol;
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    vis[i] = true;
    sol.push_back({i});
    int pre = i;
    for (int j = nxt[i][0]; j != i;) {
      sol.back().push_back(j);
      vis[j] = true;
      int tmp = nxt[j][0] + nxt[j][1] - pre;
      pre = j;
      j = tmp;
    }
  }
  cout << sol.size() << "\n";
  for (auto v : sol) {
    cout << v.size() << " ";
    for (auto i : v) cout << i << " ";
    cout << "\n";
  }
  return 0;
}