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.
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 205;
const int MAXP = 20006;
const int inf = 1000000007;
int lp[MAXP] = {0};
vector<int> primes;
void getPrimes() {
  for (int i = 2; i < MAXP; i++) {
    if (lp[i] == 0) {
      lp[i] = i;
      primes.push_back(i);
    }
    for (int j = 0;
         j < primes.size() && primes[j] <= lp[i] && i * primes[j] < MAXP; j++)
      lp[i * primes[j]] = primes[j];
  }
}
int a[MAXN];
int G[MAXN][MAXN] = {0}, Aug[MAXN][MAXN] = {0};
vector<int> p[MAXN];
bool been[MAXN];
int last[MAXN], MinOnPath[MAXN];
queue<int> Q;
bool AugmentationSucceeded(int N) {
  for (int i = 1; i <= N; i++) {
    been[i] = false;
    last[i] = 0;
    MinOnPath[i] = inf;
  }
  while (Q.size() != 0) Q.pop();
  been[1] = true;
  Q.push(1);
  int u;
  while (Q.size() != 0) {
    u = Q.front();
    Q.pop();
    if (u == N) break;
    for (int i = 0; i < p[u].size(); i++) {
      int v = p[u][i];
      if (!been[v] && Aug[u][v] > 0) {
        been[v] = true;
        last[v] = u;
        MinOnPath[v] = min(MinOnPath[u], Aug[u][v]);
        Q.push(v);
      }
    }
  }
  if (u != N) return false;
  int d = MinOnPath[u];
  while (last[u] != 0) {
    Aug[last[u]][u] -= d;
    Aug[u][last[u]] += d;
    u = last[u];
  }
  return true;
}
vector<int> T[MAXN];
void DFS(int v, vector<int>& V) {
  been[v] = true;
  V.push_back(v);
  for (int i = 0; i < p[v].size(); i++) {
    int u = p[v][i];
    if (!been[u]) DFS(u, V);
  }
}
int main() {
  getPrimes();
  int N;
  cin >> N;
  int Even = 0, Odd = 0;
  for (int i = 2; i <= N + 1; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      G[1][i] = Aug[1][i] = 2;
      p[1].push_back(i);
      Even++;
    } else {
      G[i][N + 2] = Aug[i][N + 2] = 2;
      p[i].push_back(N + 2);
      Odd++;
    }
  }
  if (Odd != Even) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 2; i <= N + 1; i++) {
    for (int j = i + 1; j <= N + 1; j++) {
      if (lp[a[i] + a[j]] == a[i] + a[j]) {
        if (a[i] % 2 == 0)
          G[i][j] = Aug[i][j] = 1;
        else
          G[j][i] = Aug[j][i] = 1;
        p[i].push_back(j);
        p[j].push_back(i);
      }
    }
  }
  N += 2;
  while (AugmentationSucceeded(N)) {
  };
  int flow = 0;
  for (int i = 1; i <= N; i++) flow += Aug[i][1];
  if (flow != 2 * Even) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 1; i <= N; i++) {
    p[i].clear();
    been[i] = false;
  }
  for (int i = 2; i < N; i++) {
    for (int j = 2; j < N; j++) {
      if (G[i][j] > 0 && Aug[i][j] == 0) {
        p[i - 1].push_back(j - 1);
        p[j - 1].push_back(i - 1);
      }
    }
  }
  int tables = 0;
  N -= 2;
  for (int i = 1; i <= N; i++) {
    if (!been[i]) {
      tables++;
      DFS(i, T[tables]);
    }
  }
  cout << tables << endl;
  for (int i = 1; i <= tables; i++) {
    cout << T[i].size() << " ";
    for (int j = 0; j < T[i].size(); j++) cout << T[i][j] << " ";
    cout << endl;
  }
  return 0;
}
