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;
using Int = long long;
const char newl = '\n';
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
template <typename T>
void drop(const T &x) {
  cout << x << endl;
  exit(0);
}
template <typename T = int>
vector<T> read(size_t n) {
  vector<T> ts(n);
  for (size_t i = 0; i < n; i++) cin >> ts[i];
  return ts;
}
template <typename T>
int isprime(T x) {
  if (x <= 1) return 0;
  for (T i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
template <typename Flow, bool directed>
struct Dinic {
  struct Edge {
    int dst;
    Flow cap;
    int rev;
    Edge(int dst, Flow cap, int rev) : dst(dst), cap(cap), rev(rev) {}
  };
  vector<vector<Edge>> G;
  vector<int> level, iter;
  Dinic(int n) : G(n), level(n), iter(n) {}
  int add_edge(int src, int dst, Flow cap) {
    int e = G[src].size();
    int r = (src == dst ? e + 1 : G[dst].size());
    G[src].emplace_back(dst, cap, r);
    G[dst].emplace_back(src, directed ? 0 : cap, e);
    return e;
  }
  void bfs(int s) {
    fill(level.begin(), level.end(), -1);
    queue<int> que;
    level[s] = 0;
    que.emplace(s);
    while (!que.empty()) {
      int v = que.front();
      que.pop();
      for (Edge &e : G[v]) {
        if (e.cap > 0 and level[e.dst] < 0) {
          level[e.dst] = level[v] + 1;
          que.emplace(e.dst);
        }
      }
    }
  }
  Flow dfs(int v, int t, Flow f) {
    if (v == t) return f;
    for (int &i = iter[v]; i < (int)G[v].size(); i++) {
      Edge &e = G[v][i];
      if (e.cap > 0 and level[v] < level[e.dst]) {
        Flow d = dfs(e.dst, t, min(f, e.cap));
        if (d == 0) continue;
        e.cap -= d;
        G[e.dst][e.rev].cap += d;
        return d;
      }
    }
    return 0;
  }
  Flow flow(int s, int t, Flow lim) {
    Flow fl = 0;
    while (1) {
      bfs(s);
      if (level[t] < 0 or lim == 0) break;
      fill(iter.begin(), iter.end(), 0);
      while (1) {
        Flow f = dfs(s, t, lim);
        if (f == 0) break;
        fl += f;
        lim -= f;
      }
    }
    return fl;
  }
  Flow flow(int s, int t) {
    return flow(s, t, numeric_limits<Flow>::max() / 2);
  }
  Flow cut(int s, int t, int x, int a) {
    static_assert(directed, "must be directed");
    auto &e = G[x][a];
    int y = e.dst;
    Flow cr = G[y][e.rev].cap;
    if (cr == 0) return e.cap = 0;
    e.cap = G[y][e.rev].cap = 0;
    Flow cap = cr - flow(x, y, cr);
    if (x != s and cap != 0) flow(x, s, cap);
    if (t != y and cap != 0) flow(t, y, cap);
    return cap;
  }
  Flow link(int s, int t, int x, int a, Flow f) {
    auto &e = G[x][a];
    e.cap += f;
    return flow(s, t, f);
  }
};
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  auto as = read(n);
  const int MAX = 3e4;
  vector<int> pr(MAX);
  for (int i = 2; i < MAX; i++) pr[i] = isprime(i);
  int S = n, T = n + 1;
  Dinic<int, true> G(n + 2);
  using P = pair<int, int>;
  vector<vector<P>> I(n);
  for (int i = 0; i < n; i++) {
    if (as[i] & 1) {
      G.add_edge(S, i, 2);
      for (int j = 0; j < n; j++) {
        if (pr[as[i] + as[j]]) {
          int k = G.add_edge(i, j, 1);
          I[i].emplace_back(j, k);
        }
      }
    } else {
      G.add_edge(i, T, 2);
    }
  }
  if (G.flow(S, T) != n) drop("Impossible");
  vector<set<int>> H(n);
  for (int i = 0; i < n; i++) {
    for (auto [j, k] : I[i]) {
      if (G.G[i][k].cap == 0) {
        H[i].emplace(j);
        H[j].emplace(i);
      }
    }
  }
  vector<vector<int>> C;
  vector<int> used(n, 0);
  for (int i = 0; i < n; i++) {
    if (used[i]) continue;
    C.emplace_back();
    int cur = i;
    while (!H[cur].empty()) {
      int nxt = *H[cur].begin();
      assert(pr[as[cur] + as[nxt]]);
      H[cur].erase(nxt);
      H[nxt].erase(cur);
      cur = nxt;
      C.back().emplace_back(cur);
    }
    for (int v : C.back()) used[v] = 1;
  }
  cout << C.size() << newl;
  for (auto vs : C) {
    cout << vs.size();
    for (int v : vs) cout << ' ' << v + 1;
    cout << newl;
  }
  return 0;
}