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;
vector<int> si(100005), odd, even, v(1005), adj[1005], out[1005];
int a[1005], cap[1005][1005], coun;
stack<int> st;
queue<int> q;
void fnc() {
  int i, j;
  si[0] = 1;
  si[1] = 1;
  for (i = 4; i < 100005; i += 2) si[i] = 1;
  for (i = 3; i * i < 100005; i += 2) {
    if (!si[i]) {
      for (j = i + i; j < 100005; j += i) si[j] = 1;
    }
  }
}
void dfs(int cur, int prev) {
  int i;
  st.push(cur);
  coun++;
  v[cur] = 1;
  for (i = 0; i < adj[cur].size(); i++) {
    if (!v[adj[cur][i]]) {
      dfs(adj[cur][i], cur);
    }
  }
}
int main() {
  fnc();
  int n, i, j, t1, t2, cur;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] & 1)
      odd.push_back(i);
    else
      even.push_back(i);
  }
  if (odd.size() != n / 2) {
    cout << "Impossible\n";
    return 0;
  }
  for (i = 0; i < n / 2; i++) {
    adj[0].push_back(odd[i]);
    adj[odd[i]].push_back(0);
    cap[0][odd[i]] = 2;
    adj[even[i]].push_back(202);
    adj[202].push_back(even[i]);
    cap[even[i]][202] = 2;
  }
  for (i = 0; i < n / 2; i++) {
    t1 = a[odd[i]];
    for (j = 0; j < n / 2; j++) {
      t2 = a[even[j]];
      if (!si[t1 + t2]) {
        adj[odd[i]].push_back(even[j]);
        cap[odd[i]][even[j]] = 1;
        adj[even[j]].push_back(odd[i]);
        cap[even[j]][odd[i]] = 0;
      }
    }
  }
  int flow = 0;
  while (1) {
    while (!q.empty()) q.pop();
    bool vis[1005];
    int pre[1005];
    memset(vis, 0, sizeof(vis));
    q.push(0);
    vis[0] = 1;
    pre[0] = -1;
    while (!q.empty()) {
      cur = q.front();
      q.pop();
      if (cur == 202) break;
      for (i = 0; i < adj[cur].size(); i++) {
        t1 = adj[cur][i];
        if (vis[t1] || !cap[cur][t1]) continue;
        q.push(t1);
        vis[t1] = 1;
        pre[t1] = cur;
      }
    }
    if (!vis[202]) break;
    t1 = 202;
    t2 = 1000000007;
    while (pre[t1] != -1) {
      t2 = min(t2, cap[pre[t1]][t1]);
      t1 = pre[t1];
    }
    t1 = 202;
    while (pre[t1] != -1) {
      cap[pre[t1]][t1] -= t2;
      cap[t1][pre[t1]] += t2;
      t1 = pre[t1];
    }
    flow += t2;
  }
  t1 = 0;
  for (i = 0; i < n / 2; i++) {
    t1 += cap[202][even[i]];
  }
  if (t1 != n) {
    cout << "Impossible\n";
    return 0;
  }
  for (i = 0; i <= n; i++) adj[i].clear();
  for (i = 0; i < n / 2; i++) {
    t1 = even[i];
    for (j = 0; j < n / 2; j++) {
      t2 = odd[j];
      if (cap[t1][t2]) {
        adj[t1].push_back(t2);
        adj[t2].push_back(t1);
      }
    }
  }
  int k = 0;
  for (i = 1; i <= n; i++) {
    if (!v[i]) {
      dfs(i, -1);
      while (!st.empty()) {
        out[k].push_back(st.top());
        st.pop();
      }
      k++;
    }
  }
  cout << k << endl;
  for (i = 0; i < k; i++) {
    cout << out[i].size() << " ";
    for (j = 0; j < out[i].size(); j++) cout << out[i][j] << " ";
    cout << endl;
  }
  return 0;
}