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;
int edge[300][300];
int next1[300];
int next2[300];
int alpha;
int dfsflow(int u, int v) {
  queue<pair<int, int> > q;
  vector<int> P(alpha, -1);
  P[u] = -2;
  q.push(make_pair(u, INT_MAX));
  int ans = 0;
  while (!q.empty()) {
    auto cur = q.front();
    if (cur.first == v) {
      ans = cur.second;
      break;
    }
    q.pop();
    for (int i = 0; i < alpha; i++) {
      if (edge[cur.first][i] and P[i] == -1) {
        P[i] = cur.first;
        q.push(make_pair(i, min(cur.second, edge[cur.first][i])));
      }
    }
  }
  if (P[v] == -1) return 0;
  int cur = v;
  while (cur) {
    edge[cur][P[cur]] += ans;
    edge[P[cur]][cur] -= ans;
    cur = P[cur];
  }
  return ans;
}
bool isPrime(long long N) {
  if (N < 2) return false;
  if (N < 4) return true;
  if ((N & 1) == 0) return false;
  if (N % 3 == 0) return false;
  long long curr = 5;
  while (curr <= sqrt(N)) {
    if (N % curr == 0) return false;
    curr += 2;
    if (N % curr == 0) return false;
    curr += 4;
  }
  return true;
}
void solve() {
  int n;
  cin >> n;
  alpha = n + 5;
  vector<int> x(n);
  for (int i = 0; i < n; i++) cin >> x[i];
  vector<int> even, odd;
  for (int i = 0; i < n; i++) {
    if (x[i] % 2)
      odd.push_back(i);
    else
      even.push_back(i);
  }
  if ((int)odd.size() != (int)even.size()) {
    cout << "Impossible\n";
    return;
  }
  for (int i = 0; i < n / 2; i++) {
    for (int j = 0; j < n / 2; j++) {
      if (isPrime(x[odd[i]] + x[even[j]])) {
        edge[1 + i][1 + n / 2 + j] = 1;
      }
    }
  }
  for (int i = 1; i < n / 2 + 1; i++)
    edge[0][i] = 1, edge[n / 2 + i][n + 1] = 1;
  int flow = 0;
  while (true) {
    int ans = dfsflow(0, n + 1);
    if (ans)
      flow += ans;
    else
      break;
  }
  if (flow != n / 2) {
    cout << "Impossible\n";
    return;
  }
  for (int i = n / 2 + 1; i < n + 1; i++) {
    for (int j = 1; j < n / 2 + 1; j++) {
      if (edge[i][j]) next1[j] = i - n / 2;
    }
  }
  memset(edge, 0, sizeof edge);
  for (int i = 0; i < n / 2; i++) {
    for (int j = 0; j < n / 2; j++) {
      if (isPrime(x[even[i]] + x[odd[j]]) and next1[j + 1] != i + 1) {
        edge[1 + i][1 + n / 2 + j] = 1;
      }
    }
  }
  for (int i = 1; i < n / 2 + 1; i++)
    edge[0][i] = 1, edge[n / 2 + i][n + 1] = 1;
  flow = 0;
  while (true) {
    int ans = dfsflow(0, n + 1);
    if (ans)
      flow += ans;
    else
      break;
  }
  if (flow != n / 2) {
    cout << "Impossible\n";
    return;
  }
  for (int i = n / 2 + 1; i < n + 1; i++) {
    for (int j = 1; j < n / 2 + 1; j++) {
      if (edge[i][j]) next2[j] = i - n / 2;
    }
  }
  vector<bool> vis(n + 1);
  vector<vector<int> > finans;
  for (int i = 1; i < n / 2 + 1; i++) {
    if (vis[i]) continue;
    pair<int, int> cur = make_pair(i, 0);
    vector<int> ans;
    do {
      if (!cur.second)
        ans.push_back(odd[cur.first - 1] + 1),
            vis[cur.first] = 1, cur = make_pair(next1[cur.first], 1);
      else
        ans.push_back(even[cur.first - 1] + 1),
            cur = make_pair(next2[cur.first], 0);
    } while (cur != make_pair(i, 0));
    finans.push_back(ans);
  }
  cout << (int)finans.size() << '\n';
  for (auto& i : finans) {
    cout << (int)i.size() << " ";
    for (auto j : i) cout << j << " ";
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}