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;
const long long MAXN = 666;
const long long INF = 1e18;
struct Edge {
  long long cap, f, to, idx;
  Edge(const long long &x, const long long &i, const long long &c,
       const long long &flow) {
    cap = c;
    f = flow;
    to = x;
    idx = i;
  }
};
long long p[MAXN];
long long d[MAXN];
long long n, s, t;
vector<Edge> g[MAXN];
bool bfs() {
  fill(d, d + MAXN, INF);
  d[s] = 0;
  queue<long long> q;
  q.push(s);
  while (!q.empty()) {
    long long v = q.front();
    q.pop();
    for (auto e : g[v]) {
      if (e.cap > e.f && d[e.to] == INF) {
        d[e.to] = d[v] + 1;
        q.push(e.to);
      }
    }
  }
  return (d[t] != INF);
}
long long dfs(const long long &v, const long long &minC) {
  if (v == t || minC == 0) {
    return minC;
  }
  for (long long i = p[v]; i < g[v].size(); ++i) {
    auto &e = g[v][i];
    if (d[e.to] == d[v] + 1) {
      long long delta = dfs(e.to, min(minC, e.cap - e.f));
      if (delta) {
        e.f += delta;
        g[e.to][e.idx].f -= delta;
        return delta;
      }
    }
    ++p[v];
  }
  return 0;
}
long long find_max_flow() {
  long long max_flow = 0;
  while (bfs()) {
    fill(p, p + MAXN, 0);
    long long flow = dfs(s, INF);
    while (flow) {
      max_flow += flow;
      flow = dfs(s, INF);
    }
  }
  return max_flow;
}
bool prime(long long x) {
  for (long long i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
vector<long long> new_g[MAXN];
vector<long long> table;
long long colored[MAXN];
void unite(const long long &v, const long long &c) {
  colored[v] = c;
  table.emplace_back(v);
  for (auto to : new_g[v]) {
    if (!colored[to]) {
      unite(to, c);
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed << setprecision(15);
  cin >> n;
  vector<long long> a(n + 1);
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; ++i) {
    if (a[i] % 2 == 1) continue;
    for (long long j = 1; j <= n; ++j) {
      if (a[j] % 2 == 0) continue;
      if (prime(a[i] + a[j])) {
        long long idx = g[i].size();
        long long idxr = g[n + j].size();
        g[i].emplace_back(n + j, idxr, 1, 0);
        g[n + j].emplace_back(i, idx, 0, 0);
      }
    }
  }
  for (long long i = 1; i <= n; ++i) {
    long long idx = g[0].size();
    long long idxr = g[i].size();
    g[0].emplace_back(i, idxr, 2, 0);
    g[i].emplace_back(0, idx, 0, 0);
    idx = g[2 * n + 1].size();
    idxr = g[n + i].size();
    g[n + i].emplace_back(2 * n + 1, idx, 2, 0);
    g[2 * n + 1].emplace_back(n + i, idxr, 0, 0);
  }
  s = 0, t = 2 * n + 1;
  long long maxflow = find_max_flow();
  if (maxflow == n) {
    for (long long i = 1; i <= n; ++i) {
      for (auto e : g[i]) {
        if (e.f != 1) continue;
        new_g[i].emplace_back(e.to - n);
        new_g[e.to - n].emplace_back(i);
      }
    }
    long long c = 0;
    vector<vector<long long>> ans;
    for (long long i = 1; i <= n; ++i) {
      if (!colored[i]) {
        table.clear();
        unite(i, ++c);
        ans.emplace_back(table);
      }
    }
    cout << ans.size() << '\n';
    for (auto &v : ans) {
      cout << v.size() << ' ';
      for (auto x : v) cout << x << ' ';
      cout << '\n';
    }
  } else {
    cout << "Impossible";
  }
  return 0;
}