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;
class MaxFlow {
  struct edge {
    int to, rev, cap;
    edge() {}
    edge(int to, int rev, int cap) : to(to), rev(rev), cap(cap) {}
  };
  vector<int> used, level, iter;
  int V;
  static const int INF = 1 << 30;

 public:
  vector<vector<edge>> Graph;
  MaxFlow(int size) : V(size) {
    Graph.resize(V);
    iter.resize(V, 0);
    level.resize(V);
    used.resize(V, 0);
  }
  void add(int from, int to, int cap) {
    Graph[from].push_back(edge(to, Graph[to].size(), cap));
    Graph[to].push_back(edge(from, Graph[from].size() - 1, 0));
  }
  void dinic_bfs(int s) {
    fill(level.begin(), level.end(), -1);
    queue<int> q;
    q.push(s);
    level[s] = 0;
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int i = 0; i < Graph[v].size(); i++) {
        edge &e = Graph[v][i];
        if (e.cap <= 0 || level[e.to] >= 0) continue;
        level[e.to] = level[v] + 1;
        q.push(e.to);
      }
    }
  }
  int dinic_dfs(int s, int t, int f) {
    if (s == t) return f;
    for (int &i = iter[s]; i < Graph[s].size(); i++) {
      edge &e = Graph[s][i];
      if (e.cap <= 0 || level[e.to] <= level[s]) continue;
      int res = dinic_dfs(e.to, t, min(f, e.cap));
      if (res > 0) {
        e.cap -= res;
        Graph[e.to][e.rev].cap += res;
        return res;
      }
    }
    return 0;
  }
  int dinic(int s, int t) {
    int res = 0;
    while (1) {
      dinic_bfs(s);
      if (level[t] < 0) break;
      fill(iter.begin(), iter.end(), 0);
      int f;
      while (f = dinic_dfs(s, t, INF)) {
        res += f;
      }
    }
    return res;
  }
  int max_flow(int s, int t) { return dinic(s, t); }
};
const int N = 1e5;
int pr[N];
vector<int> newG[210];
int visit[210];
void dfs(int v, vector<int> &path) {
  visit[v] = 1;
  path.push_back(v + 1);
  for (auto to : newG[v]) {
    if (visit[to]) continue;
    dfs(to, path);
  }
  return;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout.setf(ios::fixed);
  cout.precision(20);
  fill(pr, pr + N, 1);
  pr[0] = pr[1] = 0;
  for (int i = 2; i < N; ++i) {
    if (!pr[i]) continue;
    for (int j = i * 2; j < N; j += i) pr[j] = 0;
  }
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (int)(n); ++i) {
    cin >> a[i];
  }
  MaxFlow mf(n + 2);
  const int SRC = n, SNK = n + 1;
  for (int i = (0); i < (int)(n); ++i)
    for (int j = (0); j < (int)(n); ++j) {
      if (a[i] & 1) {
        if (a[j] & 1) continue;
        if (pr[a[i] + a[j]]) {
          mf.add(i, j, 1);
        }
      }
    }
  for (int i = (0); i < (int)(n); ++i) {
    if (a[i] & 1)
      mf.add(SRC, i, 2);
    else
      mf.add(i, SNK, 2);
  }
  int f = mf.max_flow(SRC, SNK);
  if (f != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  auto G = mf.Graph;
  for (int i = (0); i < (int)(n); ++i) {
    if (a[i] & 1) {
      for (auto e : G[i]) {
        if (e.cap == 0) {
          newG[i].push_back(e.to);
          newG[e.to].push_back(i);
        }
      }
    }
  }
  vector<vector<int>> ans;
  for (int i = (0); i < (int)(n); ++i) {
    if (!visit[i]) {
      vector<int> res;
      dfs(i, res);
      ans.push_back(res);
    }
  }
  cout << ans.size() << endl;
  for (auto vec : ans) {
    int k = vec.size();
    cout << k << ' ';
    for (int i = (0); i < (int)(k); ++i) cout << vec[i] << " \n"[i == k - 1];
  }
}