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;
struct TEdge {
  int from, to;
  long long capacity, flow;
  long long cost;
  TEdge* reverse;
};
TEdge edgePool[1000000];
int edgePoolPtr = 0;
typedef vector<TEdge*> ve;
vector<ve> edges;
int SOURCE, TARGET;
TEdge* AddEdge(int from, int to, long long capacity, long long cost = 0) {
  TEdge* e1 = &edgePool[edgePoolPtr++];
  TEdge* e2 = &edgePool[edgePoolPtr++];
  TEdge fw = {from, to, capacity, 0, cost, e2};
  TEdge bw = {to, from, 0, 0, cost, e1};
  *e1 = fw;
  *e2 = bw;
  edges[from].push_back(e1);
  edges[to].push_back(e2);
  return e1;
}
inline long long AvailableCapacity(const TEdge* p) {
  return (p->capacity - p->flow);
}
vector<int> Distances;
vector<size_t> Ptr;
int N;
void BFS() {
  deque<int> q;
  Distances.assign(N, -1);
  Distances[SOURCE] = 0;
  q.push_back(SOURCE);
  while (!q.empty()) {
    int p = q.front();
    q.pop_front();
    for (size_t i = 0; i < edges[p].size(); i++) {
      if (!AvailableCapacity(edges[p][i])) continue;
      int c = edges[p][i]->to;
      if (Distances[c] == -1) {
        Distances[c] = Distances[p] + 1;
        q.push_back(c);
      }
    }
  }
}
long long DFS(int p, long long fl) {
  if (fl == 0) return 0;
  if (p == TARGET) return fl;
  long long res = 0;
  for (size_t& i = Ptr[p]; Ptr[p] < edges[p].size() && fl != 0; ++i) {
    if (!AvailableCapacity(edges[p][i])) {
      continue;
    }
    if (Distances[edges[p][i]->from] + 1 != Distances[edges[p][i]->to])
      continue;
    long long pushed =
        DFS(edges[p][i]->to, min(fl, AvailableCapacity(edges[p][i])));
    fl -= pushed;
    res += pushed;
    edges[p][i]->flow += pushed;
    edges[p][i]->reverse->flow -= pushed;
    if (fl == 0) break;
  }
  return res;
}
long long GetMaxFlow() {
  N = (int)edges.size();
  long long res = 0;
  while (true) {
    BFS();
    Ptr.assign(N, 0);
    long long p = DFS(SOURCE, 1e18 / 2);
    if (!p) break;
    res += p;
  }
  return res;
}
vector<vector<int> > gr;
vector<int> was;
vector<int> res;
void resdfs(int v) {
  if (was[v]) return;
  was[v] = 1;
  res.push_back(v);
  for (int i = 0; i < gr[v].size(); ++i) {
    resdfs(gr[v][i]);
  }
}
int main() {
  vector<int> erat(100000, 1);
  erat[0] = erat[1] = 0;
  for (int i = 2; i * i < erat.size(); ++i)
    if (erat[i]) {
      for (int j = i * i; j < erat.size(); j += i) erat[j] = 0;
    }
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> odd, even;
  vector<int> indodd, indeven;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (a[i] % 2) {
      odd.push_back(a[i]);
      indodd.push_back(i);
    } else {
      even.push_back(a[i]);
      indeven.push_back(i);
    }
  }
  if (odd.size() != even.size()) {
    cout << "Impossible" << endl;
    return 0;
  }
  int m = odd.size();
  SOURCE = n, TARGET = n + 1;
  edges.resize(n + 2);
  for (int i = 0; i < odd.size(); ++i)
    for (int j = 0; j < even.size(); ++j)
      if (erat[odd[i] + even[j]]) {
        AddEdge(i, m + j, 1);
      }
  for (int i = 0; i < odd.size(); ++i) {
    AddEdge(SOURCE, i, 2);
  }
  for (int i = 0; i < even.size(); ++i) {
    AddEdge(m + i, TARGET, 2);
  }
  int flow = GetMaxFlow();
  if (flow != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  gr.resize(n);
  for (int i = 0; i < odd.size(); ++i) {
    for (int j = 0; j < edges[i].size(); ++j)
      if (edges[i][j]->flow && edges[i][j]->to < n) {
        gr[i].push_back(edges[i][j]->to);
        gr[edges[i][j]->to].push_back(i);
      }
  }
  was.assign(n, 0);
  vector<vector<int> > ans;
  for (int i = 0; i < n; ++i)
    if (!was[i]) {
      res.clear();
      resdfs(i);
      ans.push_back(res);
    }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i].size();
    for (int j = 0; j < ans[i].size(); ++j) {
      int x = 0;
      if (ans[i][j] < m) {
        x = indodd[ans[i][j]];
      } else {
        x = indeven[ans[i][j] - m];
      }
      cout << ' ' << x + 1;
    }
    cout << endl;
  }
  return 0;
}