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 MAX_N = 201;
const long long MOD = 1000000007;
const int INF32 = 0x3f3f3f3f;
const long long INF = 1e18;
struct Edge {
  int v, u;
  long long cap, flow = 0;
  Edge(int v, int u, long long cap) : v(v), u(u), cap(cap) {}
};
class Dinic {
  const long long flow_inf = 1e18;
  vector<vector<int>> adj;
  int n, m = 0;
  int second, t;
  vector<int> level, ptr;
  queue<int> q;
  bool bfs() {
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int id : adj[v]) {
        if (edges[id].cap - edges[id].flow < 1) continue;
        if (level[edges[id].u] != -1) continue;
        level[edges[id].u] = level[v] + 1;
        q.push(edges[id].u);
      }
    }
    return level[t] != -1;
  }
  long long dfs(int v, long long pushed) {
    if (pushed == 0) return 0;
    if (v == t) return pushed;
    for (int& cid = ptr[v]; cid < (int)adj[v].size(); cid++) {
      int id = adj[v][cid];
      int u = edges[id].u;
      if (level[v] + 1 != level[u] || edges[id].cap - edges[id].flow < 1)
        continue;
      long long tr = dfs(u, min(pushed, edges[id].cap - edges[id].flow));
      if (tr == 0) continue;
      edges[id].flow += tr;
      edges[id ^ 1].flow -= tr;
      return tr;
    }
    return 0;
  }

 public:
  vector<Edge> edges;
  Dinic(int n, int second, int t) : n(n), second(second), t(t) {
    adj.resize(n);
    level.resize(n);
    ptr.resize(n);
  }
  void add_edge(int v, int u, long long cap) {
    edges.emplace_back(v, u, cap);
    edges.emplace_back(u, v, 0);
    adj[v].push_back(m);
    adj[u].push_back(m + 1);
    m += 2;
  }
  long long flow() {
    long long first = 0;
    while (true) {
      fill(level.begin(), level.end(), -1);
      level[second] = 0;
      q.push(second);
      if (!bfs()) break;
      fill(ptr.begin(), ptr.end(), 0);
      while (long long pushed = dfs(second, flow_inf)) first += pushed;
    }
    return first;
  }
};
int n;
bool notprime[20001], visited[MAX_N];
vector<int> adj[MAX_N];
vector<vector<int>> cycles;
vector<pair<int, int>> even, odd;
set<int> primes;
int main(int argc, const char* argv[]) {
  cin >> n;
  Dinic dinic(n + 2, 0, 1);
  for (int i = (0); i < (n); i++) {
    int x;
    cin >> x;
    if (x & 1)
      odd.push_back({x, i});
    else
      even.push_back({x, i});
  }
  if (odd.size() != even.size()) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = (2); i < (20001); i++) {
    if (!notprime[i]) primes.insert(i);
    for (int x : primes) {
      if (i * x < 20001) notprime[i * x] = true;
      if (!(i % x) || i * x >= 20001) break;
    }
  }
  for (pair<int, int> x : odd)
    for (pair<int, int> y : even) {
      if (primes.find(x.first + y.first) == primes.end()) continue;
      dinic.add_edge(x.second + 2, y.second + 2, 1);
    }
  for (pair<int, int> x : odd) dinic.add_edge(0, x.second + 2, 2);
  for (pair<int, int> y : even) dinic.add_edge(y.second + 2, 1, 2);
  int fl = dinic.flow();
  if (fl != n) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 0; i < dinic.edges.size(); i += 2) {
    Edge x = dinic.edges[i], y = dinic.edges[i + 1];
    if (x.flow == x.cap && y.flow != y.cap && x.u != 1 && x.v != 1 && x.u &&
        x.v) {
      adj[x.u - 1].push_back(x.v - 1);
      adj[x.v - 1].push_back(x.u - 1);
    }
  }
  for (int i = (1); i < (n + 1); i++) {
    if (visited[i]) continue;
    vector<int> curr;
    int x = i;
    while (!visited[x]) {
      int temp = x;
      curr.push_back(x);
      visited[x] = true;
      for (int y : adj[x])
        if (!visited[y]) x = y;
    }
    cycles.push_back(curr);
  }
  cout << cycles.size() << endl;
  for (int i = (0); i < (cycles.size()); i++) {
    cout << cycles[i].size() << ' ';
    for (int j = (0); j < (cycles[i].size()); j++) cout << cycles[i][j] << ' ';
    cout << endl;
  }
  return 0;
}