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 long long INF = 1e9;
const long double EPS = 1e-14;
int N;
vector<int> a;
vector<vector<int>> g;
struct Edge {
  int to, flow, maxf;
  Edge(int to = -1, int flow = -1, int maxf = -1) {
    this->flow = flow;
    this->maxf = maxf;
    this->to = to;
  }
};
vector<Edge> edges;
void addEdge(int from, int to, int maxf = 1) {
  g[from].push_back(edges.size());
  edges.push_back(Edge(to, 0, maxf));
  g[to].push_back(edges.size());
  edges.push_back(Edge(from, 0, 0));
}
const int MAXN = 10000 + 10000 + 14;
vector<char> isPrime(MAXN, true);
void constructPrimes() {
  isPrime[0] = false;
  isPrime[1] = false;
  for (int i = 2; i < MAXN; i++) {
    if (!isPrime[i]) continue;
    for (int j = i * 2; j < MAXN; j += i) {
      isPrime[j] = false;
    }
  }
}
int iter = 0;
vector<int> used;
vector<int> from;
char dfs(int v) {
  used[v] = iter;
  if (v == N + 1) return true;
  for (int i = 0; i < int(g[v].size()); i++) {
    Edge e = edges[g[v][i]];
    if (used[e.to] == iter || e.maxf == e.flow) continue;
    if (dfs(e.to)) {
      from[e.to] = g[v][i];
      return true;
    }
  }
  return false;
}
vector<vector<int>> gg;
vector<char> visit;
vector<int> getAns(int v) {
  vector<int> ret;
  ret.push_back(v);
  while (1) {
    visit[v] = true;
    v = ((visit[gg[v][0]]) ? gg[v][1] : gg[v][0]);
    if (visit[v]) break;
    ret.push_back(v);
  }
  return ret;
}
int main() {
  constructPrimes();
  int n;
  cin >> n;
  N = n;
  a.resize(n + 2);
  g.resize(n + 2);
  gg.resize(n);
  for (int i = 0; i < int(n); i++) {
    cin >> a[i];
  }
  int cnteven = 0;
  for (int i = 0; i < int(n); i++) {
    if (a[i] % 2 == 0) {
      cnteven++;
      for (int j = 0; j < int(n); j++) {
        if (isPrime[a[i] + a[j]]) {
          addEdge(i, j, 1);
        }
      }
    }
  }
  if (cnteven != (n >> 1) || n & 1) {
    cout << "Impossible";
    return 0;
    ;
  }
  for (int i = 0; i < int(n); i++) {
    if (a[i] % 2 == 0) {
      addEdge(n, i, 2);
    } else {
      addEdge(i, n + 1, 2);
    }
  }
  used.resize(n + 2, 0);
  from.resize(n + 2, -1);
  iter = 1;
  int cnt = 0;
  while (dfs(n)) {
    cnt++;
    iter++;
    int v = n + 1;
    while (v != n) {
      int ei = from[v];
      edges[ei].flow++;
      ei ^= 1;
      edges[ei].flow--;
      v = edges[ei].to;
    }
  }
  if (cnt != n) {
    cout << "Impossible";
    return 0;
    ;
  }
  for (int i = 0; i < int(n); i++) {
    if (a[i] % 2 == 0) {
      for (int j = 0; j < int(g[i].size()); j++) {
        if (edges[g[i][j]].flow && edges[g[i][j]].to < n) {
          gg[i].push_back(edges[g[i][j]].to);
          gg[edges[g[i][j]].to].push_back(i);
        }
      }
    }
  }
  vector<vector<int>> ans;
  visit.assign(n + 2, false);
  visit[n] = true;
  visit[n + 1] = true;
  for (int i = 0; i < int(n); i++) {
    if (!visit[i]) {
      ans.push_back(getAns(i));
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < int(ans.size()); i++) {
    cout << ans[i].size() << " ";
    for (int j = 0; j < int(ans[i].size()); j++) {
      cout << ans[i][j] + 1 << " ";
    }
    cout << endl;
  }
  return 0;
}