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 p[20010] = {1, 1};
int n, a[210];
struct Edge {
  int a, b, capacity, flow;

 public:
  Edge(int a, int b, int capacity) : a(a), b(b), capacity(capacity), flow(0) {}
  int other(int v) const { return v == a ? b : a; }
  int capacityTo(int v) const { return v == b ? capacity - flow : flow; }
  void addFlowTo(int v, int f) { flow += (v == b ? f : -f); }
};
struct Graph {
  vector<Edge> edges;
  vector<vector<int>> g;
  vector<bool> used;
  vector<int> edgeTo;
  void bfs(int v) {
    queue<int> q;
    used[v] = 1;
    q.push(v);
    while (!q.empty()) {
      v = q.front();
      q.pop();
      for (int i = 0; i < g[v].size(); i++) {
        int e = g[v][i], to = edges[e].other(v);
        if (!used[to] && edges[e].capacityTo(to)) {
          edgeTo[to] = e;
          used[to] = 1;
          q.push(to);
        }
      }
    }
  }
  bool hasPath(int from, int to) {
    fill(used.begin(), used.end(), 0);
    bfs(from);
    return used[to];
  }
  int bottleneckCapacity(int from, int to) {
    int bCapacity = 1 << 30;
    for (int v = to; v != from; v = edges[edgeTo[v]].other(v))
      bCapacity = min(bCapacity, edges[edgeTo[v]].capacityTo(v));
    return bCapacity;
  }
  void addFlow(int from, int to, int flow) {
    for (int v = to; v != from; v = edges[edgeTo[v]].other(v))
      edges[edgeTo[v]].addFlowTo(v, flow);
  }

 public:
  Graph(int verticesCount) {
    g.resize(verticesCount);
    used.resize(verticesCount);
    edgeTo.resize(verticesCount);
  }
  void addEdge(int from, int to, int capacity) {
    edges.push_back(Edge(from, to, capacity));
    g[from].push_back(edges.size() - 1);
    g[to].push_back(edges.size() - 1);
  }
  long long maxFlow(int from, int to) {
    long long flow = 0;
    while (hasPath(from, to)) {
      int deltaFlow = bottleneckCapacity(from, to);
      addFlow(from, to, deltaFlow);
      flow += deltaFlow;
    }
    return flow;
  }
};
vector<int> g1[210];
int u[210];
vector<vector<int>> ans;
void dfs(int v) {
  u[v] = 1;
  ans.back().push_back(v);
  for (int to : g1[v])
    if (!u[to]) dfs(to);
}
int main() {
  for (int i = 2; i < 20010; i++) {
    if (!p[i])
      for (int j = i * i; j < 20010; j += i) p[j] = 1;
  }
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  Graph g(1 + n + 1);
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      g.addEdge(0, 1 + i, 2);
      for (int j = 0; j < n; j++)
        if (!p[a[i] + a[j]]) g.addEdge(1 + i, 1 + j, 1);
    } else {
      g.addEdge(1 + i, 1 + n, 2);
    }
  }
  int f = g.maxFlow(0, 1 + n);
  if (f != n) {
    cout << "Impossible";
    return 0;
  }
  for (const Edge &e : g.edges) {
    if (e.a == 0 || e.b == 1 + n || e.flow == 0) continue;
    int a = e.a - 1, b = e.b - 1;
    g1[a].push_back(b);
    g1[b].push_back(a);
  }
  for (int i = 0; i < n; i++) {
    if (!u[i]) {
      ans.push_back(vector<int>());
      dfs(i);
    }
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].size();
    for (int j = 0; j < ans[i].size(); j++) {
      cout << " " << ans[i][j] + 1;
    }
    cout << "\n";
  }
}