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 int INF = 2e9 + 1;
const long long INFLL = 1e18 + 1;
struct Graph {
  struct edge {
    int c, f, link, to, ind;
    int c2 = 0;
    edge() {}
    edge(int c, int f, int link, int to, int ind)
        : c(c), f(f), link(link), to(to), ind(ind) {}
  };
  vector<vector<edge>> g;
  int s, t, n;
  Graph(int N, int S, int T) {
    n = N;
    s = S, t = T;
    g.resize(n);
  }
  vector<int> usd;
  int dfs(int v, int now) {
    usd[v] = 1;
    if (v == t) return now;
    for (auto &e : g[v]) {
      if (usd[e.to] || e.f == e.c) continue;
      int x = dfs(e.to, min(now, e.c - e.f));
      if (x == 0) continue;
      e.f += x;
      g[e.to][e.link].f -= x;
      return x;
    }
    return 0;
  }
  int Ford_Fulkerson() {
    int ans = 0;
    while (1) {
      usd.assign(n, 0);
      int d = dfs(s, INF);
      ans += d;
      if (d == 0) break;
    }
    return ans;
  }
  void add_not_dir(int a, int b, int c, int i) {
    g[a].emplace_back(c, 0, g[b].size(), b, i);
    g[b].emplace_back(c, 0, g[a].size() - 1, a, i);
  }
  void add_dir(int a, int b, int c, int i) {
    g[a].emplace_back(c, 0, g[b].size(), b, i);
    g[b].emplace_back(0, 0, g[a].size() - 1, a, i);
  }
  int Edmonds_Karp() {
    int ans = 0;
    while (1) {
      queue<int> q;
      vector<int> p(n, -1), dist(n, INF), mn(n, INF);
      q.push(s);
      dist[s] = 0;
      while (!q.empty()) {
        int v = q.front();
        q.pop();
        for (auto &e : g[v]) {
          if (e.f == e.c || dist[e.to] != INF) continue;
          p[e.to] = v;
          q.push(e.to);
          dist[e.to] = dist[v] + 1;
          mn[e.to] = min(mn[v], e.c - e.f);
        }
      }
      if (dist[t] == INF) break;
      vector<int> path;
      int now = t;
      while (now != -1) {
        path.emplace_back(now);
        now = p[now];
      }
      reverse((path).begin(), (path).end());
      int F = mn[t];
      ans += F;
      for (int i = 0; i < (int)path.size() - 1; i++) {
        int v = path[i];
        for (auto &e : g[v]) {
          if (e.to == path[i + 1] && e.c - e.f >= F) {
            e.f += F;
            g[e.to][e.link].f -= F;
            break;
          }
        }
      }
    }
    return ans;
  }
  vector<int> d, uk;
  int dfs_Dinic(int v, int now) {
    if (v == t || now == 0) return now;
    for (int i = uk[v]; i < (int)g[v].size(); i++) {
      if (d[g[v][i].to] == d[v] + 1) {
        int can = g[v][i].c2 - g[v][i].f;
        int x = dfs_Dinic(g[v][i].to, min(can, now));
        if (x != 0) {
          g[v][i].f += x;
          g[g[v][i].to][g[v][i].link].f -= x;
          return x;
        }
      }
      uk[v]++;
    }
    return 0;
  }
  bool bfs() {
    d.assign(n, INF);
    d[s] = 0;
    deque<int> q;
    q.push_back(s);
    while (!q.empty()) {
      int v = q.front();
      q.pop_front();
      for (auto &e : g[v]) {
        if (e.f < e.c2 && d[e.to] == INF) {
          d[e.to] = d[v] + 1;
          q.push_back(e.to);
        }
      }
    }
    return d[t] != INF;
  }
  long long Dinic() {
    long long ans = 0;
    while (bfs()) {
      uk.assign(n, 0);
      while (1) {
        int d = dfs_Dinic(s, INF);
        if (d == 0) break;
        ans += d;
      }
    }
    return ans;
  }
  long long Fast_Dinic() {
    long long ans = 0;
    for (int j = 29; j >= 0; j--) {
      for (int i = 0; i < n; i++) {
        for (int k = 0; k < (int)g[i].size(); k++) {
          if (g[i][k].c & (1 << j)) g[i][k].c2 += (1 << j);
        }
      }
      ans += Dinic();
    }
    return ans;
  }
};
bool is_prime(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
vector<int> usd;
vector<vector<int>> gr;
void dfs_ans(int v, vector<int> &comp) {
  comp.emplace_back(v);
  usd[v] = 1;
  for (auto &to : gr[v]) {
    if (!usd[to]) dfs_ans(to, comp);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  int cnt0 = 0, cnt1 = 0;
  for (auto &c : a) {
    cin >> c;
    if (c % 2 == 0)
      cnt0++;
    else
      cnt1++;
  }
  if (cnt0 != cnt1) {
    cout << "Impossible";
    return 0;
  }
  Graph g(n + 2, n, n + 1);
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 1) {
      g.add_dir(n, i, 2, -1);
    } else {
      g.add_dir(i, n + 1, 2, i);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i] % 2 == 1 && a[j] % 2 == 0) {
        if (is_prime(a[i] + a[j])) {
          g.add_dir(i, j, 1, -1);
        }
      }
    }
  }
  int x = g.Edmonds_Karp();
  if (x != 2 * cnt0) {
    cout << "Impossible";
    return 0;
  }
  gr.resize(n);
  vector<vector<int>> ans;
  for (int i = 0; i < n; i++) {
    for (auto &e : g.g[i]) {
      if (e.f == 1) {
        gr[i].emplace_back(e.to);
        gr[e.to].emplace_back(i);
      }
    }
  }
  usd.assign(n, 0);
  for (int i = 0; i < n; i++) {
    if (!usd[i]) {
      ans.emplace_back(vector<int>());
      dfs_ans(i, ans.back());
    }
  }
  cout << ans.size() << "\n";
  for (auto &c : ans) {
    cout << c.size() << " ";
    for (auto &l : c) {
      cout << l + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}