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;
template <class T>
ostream &operator<<(ostream &os, const vector<T> &t) {
  os << "{";
  for (int(i) = 0; (i) < (t.size()); ++(i)) {
    os << t[i] << ",";
  }
  os << "}" << endl;
  return os;
}
template <class S, class T>
ostream &operator<<(ostream &os, const pair<S, T> &t) {
  return os << "(" << t.first << "," << t.second << ")";
}
struct Edge {
  int to, cap, rev;
  int cost;
};
vector<vector<Edge>> g2;
void add_edge(vector<vector<Edge>> &g, int from, int to, int cap,
              int cost = 0) {
  g[from].push_back((Edge){to, cap, (int)g[to].size(), cost});
  g[to].push_back((Edge){from, 0, (int)g[from].size() - 1, -cost});
}
int INF = 1e7;
vector<int> used, a;
int dfs(vector<vector<Edge>> &g, int v, int t, int f) {
  if (v == t) return f;
  used[v] = 1;
  int re, i, j, k;
  for (i = 0; i < g[v].size(); i++) {
    Edge &e = g[v][i];
    if (e.cap <= 0 || used[e.to]) continue;
    int d = dfs(g, e.to, t, min(f, e.cap));
    if (d > 0) {
      e.cap -= d;
      g[e.to][e.rev].cap += d;
      return d;
    }
  }
  return 0;
}
int flag;
int max_flow(vector<vector<Edge>> &g, int s, int t) {
  int sum = 0, f, V = g.size(), n = g.size() - 4;
  while (1) {
    used.resize(V);
    fill((used).begin(), (used).end(), 0);
    sum += f = dfs(g, s, t, INF);
    if (!f) {
      for (int(i) = 0; (i) < (n); ++(i))
        for (auto &gg : g[i + 2]) {
          if (gg.cap == 0 && a[i] % 2 && gg.to > 1 && gg.to < n + 2) {
            gg.cap = 0;
            g[gg.to][gg.rev].cap = 0;
            g2[i].push_back((Edge){gg.to - 2, 0, 0, 0});
            g2[gg.to - 2].push_back((Edge){i, 0, 0, 0});
          }
        }
      flag = 1;
      return sum;
    }
  }
}
int dfs2(vector<vector<int>> &re, vector<int> &usd, int p) {
  if (usd[p]) return 0;
  usd[p] = 1;
  re.back().push_back(p);
  for (auto pp : g2[p]) dfs2(re, usd, pp.to);
  return 0;
}
const int NP = 112345;
int prime[NP];
int main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(0);
  int i, j, k;
  for (i = 2; i < NP; i++)
    if (!prime[i]) {
      for (j = i + i; j < NP; j += i) prime[j] = 1;
    }
  int n;
  cin >> n;
  a.resize(n);
  g2.resize(n);
  for (int(i) = 0; (i) < (n); ++(i)) cin >> a[i];
  if (n % 2) {
    cout << "Impossible" << endl;
    return 0;
  }
  vector<vector<Edge>> g(n + 4);
  for (int(i) = 0; (i) < (n); ++(i))
    for (j = i + 1; j < n; j++) {
      if (!prime[a[i] + a[j]]) {
        if (a[i] % 2)
          add_edge(g, i + 2, j + 2, 1);
        else
          add_edge(g, j + 2, i + 2, 1);
      }
    }
  int sum = 0;
  for (int(i) = 0; (i) < (n); ++(i)) {
    if (a[i] % 2) {
      sum++;
      add_edge(g, 0, i + 2, 1);
      add_edge(g, n + 2, i + 2, 1);
    } else {
      sum--;
      add_edge(g, i + 2, 1, 1);
      add_edge(g, i + 2, n + 3, 1);
    }
  }
  if (sum) {
    cout << "Impossible" << endl;
    return 0;
  }
  if (max_flow(g, 0, 1) < n / 2) {
    cout << "Impossible" << endl;
    return 0;
  }
  if (max_flow(g, n + 2, n + 3) < n / 2) {
    cout << "Impossible" << endl;
    return 0;
  }
  vector<vector<int>> re;
  vector<int> usd(n);
  for (int(i) = 0; (i) < (n); ++(i)) {
    if (!usd[i]) {
      re.push_back(vector<int>());
      dfs2(re, usd, i);
    }
  }
  cout << re.size() << endl;
  for (auto v : re) {
    cout << v.size();
    for (int(i) = 0; (i) < (v.size()); ++(i)) cout << " " << v[i] + 1;
    cout << endl;
  }
  return 0;
}