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 N = 234;
vector<int> G[N];
vector<int>::iterator it[N];
int wagi[N][N];
int dist[N];
int si;
int n;
int a[123456];
vector<int> even, odd;
vector<int> GGG[N];
vector<vector<int> > SPO;
bool vis[N];
int zapelniane;
bool is_prime(int a);
void dfsik(int node) {
  if (vis[node]) return;
  vis[node] = true;
  SPO[zapelniane].push_back(node);
  for (int i = 0; i <= ((int(GGG[node].size())) - 1); ++i) dfsik(GGG[node][i]);
}
void ZNAJDZ_SPOJNE() {
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) {
      vector<int> tmp;
      SPO.push_back(tmp);
      zapelniane = SPO.size() - 1;
      dfsik(i);
    }
}
void daj_graf() {
  int polowa = (int(odd.size()));
  for (int i = 0; i <= (polowa - 1); ++i) {
    G[0].push_back(i + 1);
    G[i + 1].push_back(0);
    wagi[0][i + 1] = 2;
  }
  for (int i = 0; i <= (polowa - 1); ++i) {
    G[polowa + i + 1].push_back(polowa + polowa + 1);
    G[2 * polowa + 1].push_back(polowa + i + 1);
    wagi[polowa + i + 1][2 * polowa + 1] = 2;
  }
  for (int i = 0; i <= (polowa - 1); ++i)
    for (int j = 0; j <= (polowa - 1); ++j) {
      if (is_prime(a[even[j]] + a[odd[i]])) {
        G[i + 1].push_back(polowa + 1 + j);
        G[polowa + 1 + j].push_back(i + 1);
        wagi[i + 1][polowa + 1 + j] = 1;
      }
    }
}
void input() {
  cin >> n;
  for (int i = 1; i <= (n); ++i) {
    cin >> a[i];
    if (a[i] & 1) {
      odd.push_back(i);
    } else {
      even.push_back(i);
    }
  }
}
int q[N];
bool bfs(int s, int t) {
  for (int i = 0; i <= (si - 1); ++i) dist[i] = 123123123;
  dist[s] = 0;
  q[0] = s;
  int begin = 0;
  int end = 1;
  int v, sas;
  while (begin < end) {
    v = q[begin];
    ++begin;
    for (int i = 0; i <= ((int(G[v].size())) - 1); ++i) {
      sas = G[v][i];
      if (wagi[v][sas] > 0 && (dist[sas] > dist[v] + 1)) {
        dist[sas] = dist[v] + 1;
        q[end] = sas;
        ++end;
      }
    }
  }
  return (dist[t] < 123123123);
}
int dfs(int x, int t, int minimal) {
  if (x == t || !minimal) return minimal;
  int res = 0;
  for (vector<int>::iterator &itt = it[x]; itt != G[x].end(); ++itt) {
    if ((dist[*itt] == dist[x] + 1) && wagi[x][*itt] > 0) {
      int y = dfs(*itt, t, min(minimal, wagi[x][*itt]));
      wagi[x][*itt] -= y;
      wagi[*itt][x] += y;
      res += y;
      minimal -= y;
      if (minimal == 0) break;
    }
  }
  return res;
}
int maxFlow(int s, int t, int n) {
  si = n;
  int res = 0;
  while (bfs(s, t)) {
    for (int i = 0; i <= (n - 1); ++i) it[i] = G[i].begin();
    res += dfs(s, t, 123123123);
  }
  return res;
}
bool is_prime(int a) {
  for (int i = 2; i * i <= a; ++i) {
    if (a % i == 0) return false;
  }
  return true;
}
int main() {
  input();
  if ((int(odd.size())) != (int(even.size()))) {
    cout << "Impossible\n";
    return 0;
  }
  daj_graf();
  int polowa = (int(even.size()));
  int TT = maxFlow(0, 2 * polowa + 1, 2 * polowa + 2);
  if (TT == 2 * polowa) {
    for (int i = 0; i <= (polowa - 1); ++i)
      for (int j = 0; j <= (polowa - 1); ++j) {
        if (wagi[i + 1][polowa + 1 + j] == 0 &&
            is_prime(a[odd[i]] + a[even[j]])) {
          GGG[odd[i]].push_back(even[j]);
          GGG[even[j]].push_back(odd[i]);
        }
      }
    ZNAJDZ_SPOJNE();
    cout << SPO.size() << endl;
    for (int i = 0; i <= ((int(SPO.size())) - 1); ++i) {
      cout << SPO[i].size() << " ";
      for (int j = 0; j <= ((int(SPO[i].size())) - 1); ++j) {
        cout << SPO[i][j] << " ";
      }
      cout << endl;
    }
  } else {
    cout << "Impossible\n";
  }
}