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;
bool flag[20000 + 4];
int G[222][222], S, T, node, par[222], mat[222][222];
bool chk[222];
queue<int> Q;
int bfs() {
  while (!Q.empty()) Q.pop();
  memset(chk, false, sizeof chk);
  Q.push(S);
  par[S] = -1;
  chk[S] = true;
  while (!Q.empty()) {
    int top = Q.front();
    Q.pop();
    int j = 0;
    for (int i = 0; i <= node; i++) {
      if (G[top][i] > 0 && !chk[i]) {
        Q.push(i);
        par[i] = top;
        chk[i] = true;
        if (i == T) {
          j = 1;
          break;
        }
      }
    }
    if (j == 1) break;
  }
  int now = T, cap = 1000000;
  while (par[now] > -1) {
    int parent = par[now];
    cap = min(cap, G[parent][now]);
    now = parent;
  }
  now = T;
  while (par[now] > -1) {
    int parent = par[now];
    G[parent][now] -= cap;
    G[now][parent] += cap;
    now = parent;
  }
  if (cap == 1000000) return 0;
  return cap;
}
int maxflow() {
  int res = 0;
  while (true) {
    int cap = bfs();
    if (cap == 0) break;
    res += cap;
  }
  return res;
}
vector<int> tmp, V[222];
vector<vector<int> > ans;
bool vis[222];
void dfs(int x) {
  tmp.push_back(x);
  vis[x] = true;
  for (int i = 0; i < V[x].size(); i++)
    if (!vis[V[x][i]]) dfs(V[x][i]);
}
void sieve() {
  flag[1] = true;
  for (int i = 4; i <= 20000; i += 2) flag[i] = true;
  for (int i = 3; i <= 20000; i += 2) {
    if (!flag[i]) {
      for (int j = i + i; j <= 20000; j += i) flag[j] = true;
    }
  }
}
int ar[222];
int main() {
  sieve();
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ar[i];
    if (ar[i] & 1)
      G[0][i] = 2;
    else
      G[i][n + 1] = 2;
  }
  S = 0, T = n + 1;
  node = n + 1;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (!flag[ar[i] + ar[j]]) {
        if (ar[i] & 1)
          G[i][j] = mat[i][j] = 1;
        else
          G[j][i] = mat[j][i] = 1;
      }
    }
  }
  int get = maxflow();
  if (get != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (mat[i][j] != G[i][j]) {
        V[i].push_back(j);
        V[j].push_back(i);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      tmp.clear();
      dfs(i);
      ans.push_back(tmp);
    }
  }
  int sz = ans.size();
  cout << sz << endl;
  for (int i = 0; i < sz; i++) {
    cout << ans[i].size();
    for (int j = 0; j < ans[i].size(); j++) cout << " " << ans[i][j];
    cout << endl;
  }
  return 0;
}