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 oo = 27081993;
int n, v[222], used[222];
vector<int> table[222], a[222];
struct edge {
  int x, y, cap, flow;
};
struct DinicFlow {
  int n, S, T;
  vector<vector<int> > a;
  vector<int> cur, d;
  vector<edge> e;
  DinicFlow() {}
  DinicFlow(int n, int S, int T) {
    this->n = n;
    this->S = S;
    this->T = T;
    a = vector<vector<int> >(n + 1);
    cur = vector<int>(n + 1);
    d = vector<int>(n + 1);
  }
  void addEdge(int x, int y, int cap) {
    edge e1 = {x, y, cap, 0};
    edge e2 = {y, x, 0, 0};
    a[x].push_back(e.size());
    e.push_back(e1);
    a[y].push_back(e.size());
    e.push_back(e2);
  }
  int bfs() {
    queue<int> q;
    for (int i = 1; i <= n; i++) d[i] = -1;
    q.push(S);
    d[S] = 0;
    while (!q.empty() && d[T] < 0) {
      int x = q.front();
      q.pop();
      for (int i = 0; i < int(a[x].size()); i++) {
        int id = a[x][i], y = e[id].y;
        if (d[y] < 0 && e[id].flow < e[id].cap) q.push(y), d[y] = d[x] + 1;
      }
    }
    return d[T] >= 0;
  }
  int dfs(int x, int val) {
    if (!val) return 0;
    if (x == T) return val;
    for (; cur[x] < int(a[x].size()); cur[x]++) {
      int id = a[x][cur[x]], y = e[id].y;
      if (d[y] != d[x] + 1) continue;
      int pushed = dfs(y, min(val, e[id].cap - e[id].flow));
      if (pushed) {
        e[id].flow += pushed;
        e[id ^ 1].flow -= pushed;
        return pushed;
      }
    }
    return 0;
  }
  int maxFlow() {
    int res = 0;
    while (bfs()) {
      for (int i = 1; i <= n; i++) cur[i] = 0;
      while (1) {
        int val = dfs(S, oo);
        if (!val) break;
        res += val;
      }
    }
    return res;
  }
};
int isPrime(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  int S = n + 1, T = n + 2;
  DinicFlow f(T, S, T);
  for (int i = 1; i <= n; i++)
    if (v[i] % 2) {
      f.addEdge(S, i, 2);
      for (int j = 1; j <= n; j++)
        if (v[j] % 2 == 0 && isPrime(v[i] + v[j])) f.addEdge(i, j, 1);
    } else
      f.addEdge(i, T, 2);
  if (f.maxFlow() != n) {
    cout << "Impossible\n";
    return 0;
  }
  for (auto e : f.e)
    if (e.flow == 1) {
      a[e.x].push_back(e.y);
      a[e.y].push_back(e.x);
    }
  int numTable = 0;
  for (int i = 1; i <= n; i++)
    if (!used[i]) {
      numTable++;
      int x = i;
      while (1) {
        used[x] = 1;
        table[numTable].push_back(x);
        int found = 0;
        for (auto y : a[x])
          if (!used[y]) {
            x = y;
            found = 1;
            break;
          }
        if (!found) break;
      }
    }
  cout << numTable << endl;
  for (int i = 1; i <= numTable; i++) {
    cout << table[i].size() << ' ';
    for (auto j : table[i]) cout << j << ' ';
    cout << endl;
  }
}