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 d4x[4] = {1, 0, -1, 0};
int d4y[4] = {0, 1, 0, -1};
int d8x[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int d8y[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const int oo = 1e8;
const int maxN = 250;
int visited[maxN], pre[maxN], a[maxN];
int c[maxN][maxN], f[maxN][maxN];
pair<int, int> Even[maxN], Odd[maxN];
int n, val, numEven = 0, numOdd = 0, ansNum = 0;
vector<int> adj[maxN], adj2[maxN], ans[maxN];
bool isPrime(int num) {
  for (int i = 2; i <= sqrt(num); i++) {
    if (!(num % i)) return false;
  }
  return true;
}
void Get(int node) {
  if (node == 201) return;
  val = min(val, c[pre[node]][node] - f[pre[node]][node]);
  Get(pre[node]);
}
void Update(int node) {
  if (node == 201) return;
  f[pre[node]][node] += val;
  f[node][pre[node]] -= val;
  Update(pre[node]);
}
bool bfs() {
  queue<int> q;
  memset(pre, 0, sizeof(pre));
  q.push(201);
  pre[201] = -1;
  while (!q.empty()) {
    int node = q.front();
    q.pop();
    for (int i = 0; i < adj[node].size(); i++) {
      if (!pre[adj[node][i]] && c[node][adj[node][i]] > f[node][adj[node][i]]) {
        pre[adj[node][i]] = node;
        q.push(adj[node][i]);
      }
    }
  }
  return pre[202];
}
int EdmondsKarp() {
  int res = 0;
  while (bfs()) {
    val = oo;
    Get(202);
    Update(202);
    res = res + val;
  }
  return res;
}
void dfs(int Team, int node) {
  for (int i = 0; i < adj2[node].size(); i++) {
    if (!visited[adj2[node][i]]) {
      ans[Team].push_back(adj2[node][i]);
      visited[adj2[node][i]] = 1;
      dfs(Team, adj2[node][i]);
    }
  }
}
void Solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (!(a[i] % 2)) {
      numEven++;
      Even[numEven].first = a[i];
      Even[numEven].second = i;
    } else {
      numOdd++;
      Odd[numOdd].first = a[i];
      Odd[numOdd].second = i;
    }
  }
  if (numEven * 2 != n) {
    cout << "Impossible";
    return;
  }
  for (int i = 1; i <= numEven; i++) {
    adj[201].push_back(i);
    adj[i].push_back(201);
    c[201][i] = 2;
    c[i][201] = 0;
    f[201][i] = 0;
    f[i][201] = 0;
    adj[i + numEven].push_back(202);
    adj[202].push_back(i + numEven);
    c[i + numEven][202] = 2;
    c[202][i + numEven] = 0;
    f[i + numEven][202] = 0;
    c[202][i + numEven] = 0;
  }
  for (int i = 1; i <= numEven; i++) {
    for (int j = 1; j <= numOdd; j++) {
      if (isPrime(Even[i].first + Odd[j].first)) {
        adj[i].push_back(j + numEven);
        adj[j + numEven].push_back(i);
        c[i][j + numEven] = 1;
        c[j + numEven][i] = 0;
        f[i][j + numEven] = 0;
        f[j + numEven][i] = 0;
      }
    }
  }
  int temp = EdmondsKarp();
  if (temp != n) {
    cout << "Impossible";
    return;
  }
  for (int i = 1; i <= numEven; i++) {
    for (int j = 1; j <= numOdd; j++) {
      if (f[i][j + numEven] == 1) {
        adj2[Even[i].second].push_back(Odd[j].second);
        adj2[Odd[j].second].push_back(Even[i].second);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (visited[i]) continue;
    visited[i] = 1;
    ansNum++;
    ans[ansNum].push_back(i);
    dfs(ansNum, i);
  }
  cout << ansNum << endl;
  for (int i = 1; i <= ansNum; i++) {
    cout << ans[i].size() << " ";
    for (int j = 0; j < ans[i].size(); j++) cout << ans[i][j] << " ";
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  Solve();
}