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 M = 1000000007;
const int MM = 998244353;
const long double PI = acos(-1);
long long power(long long b, long long e, long long m) {
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b % m, e / 2, m) % m;
  return power(b * b % m, e / 2, m);
}
long long power(long long b, long long e) {
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b, e / 2);
  return power(b * b, e / 2);
}
template <typename T, typename U>
static inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
static inline void amax(T &x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
  return os << '(' << p.first << "," << p.second << ')';
}
const int N = 1000005;
bool prime[N];
long long pf[N];
void sieve() {
  int k = sqrt(N - 2);
  for (int i = 1; i <= N - 2; ++i) prime[i] = true;
  for (int i = 2; i <= k; ++i) {
    if (prime[i]) {
      for (int k = i * i; k <= N - 2; k += i) {
        prime[k] = false;
        pf[k] = i;
      }
    }
  }
}
template <typename flow_t = long long>
struct Dinic {
  struct FlowEdge {
    int v, u;
    flow_t cap, flow = 0;
    FlowEdge(int v, int u, flow_t cap) : v(v), u(u), cap(cap) {}
  };
  const flow_t flow_inf = numeric_limits<flow_t>::max() / 2;
  vector<FlowEdge> edges;
  vector<vector<int>> adj;
  int n, m = 0;
  int s, t;
  vector<int> level, ptr;
  queue<int> q;
  Dinic(int n, int s, int t) : n(n), s(s), t(t) {
    adj.resize(n + 1);
    level.resize(n + 1);
    ptr.resize(n + 1);
  }
  void add_edge(int v, int u, flow_t cap) {
    edges.emplace_back(v, u, cap);
    edges.emplace_back(u, v, 0);
    adj[v].push_back(m);
    adj[u].push_back(m + 1);
    m += 2;
  }
  bool bfs() {
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int id : adj[v]) {
        if (edges[id].cap - edges[id].flow < 1) continue;
        if (level[edges[id].u] != -1) continue;
        level[edges[id].u] = level[v] + 1;
        q.push(edges[id].u);
      }
    }
    return level[t] != -1;
  }
  flow_t dfs(int v, flow_t pushed) {
    if (pushed == 0) return 0;
    if (v == t) return pushed;
    for (int &cid = ptr[v]; cid < (int)adj[v].size(); cid++) {
      int id = adj[v][cid];
      int u = edges[id].u;
      if (level[v] + 1 != level[u] || edges[id].cap - edges[id].flow < 1)
        continue;
      flow_t tr = dfs(u, min(pushed, edges[id].cap - edges[id].flow));
      if (tr == 0) continue;
      edges[id].flow += tr;
      edges[id ^ 1].flow -= tr;
      return tr;
    }
    return 0;
  }
  flow_t flow() {
    flow_t f = 0;
    while (true) {
      fill(level.begin(), level.end(), -1);
      level[s] = 0;
      q.push(s);
      if (!bfs()) break;
      fill(ptr.begin(), ptr.end(), 0);
      while (flow_t pushed = dfs(s, flow_inf)) {
        f += pushed;
      }
    }
    return f;
  }
};
bitset<201> vis;
vector<int> g[201];
void dfs(int s, vector<int> &u) {
  u.push_back(s);
  vis[s] = true;
  for (auto &j : g[s]) {
    if (!vis[j]) dfs(j, u);
  }
}
int _runtimeTerror_() {
  int n;
  cin >> n;
  vector<int> v(n + 1);
  for (int i = 1; i <= n; ++i) cin >> v[i];
  Dinic<int> flow(n + 2, 0, n + 1);
  vector<int> cnt(2, 0);
  for (int i = 1; i <= n; ++i) {
    ++cnt[v[i] & 1];
    if (v[i] & 1)
      flow.add_edge(0, i, 2);
    else
      flow.add_edge(i, n + 1, 2);
    for (int j = 1; j <= n; ++j) {
      if (v[i] % 2 == 1 && v[j] % 2 == 0 && prime[v[i] + v[j]])
        flow.add_edge(i, j, 1);
    }
  }
  if (cnt[0] != cnt[1]) {
    cout << "Impossible\n";
    return 0;
  }
  int ans = flow.flow();
  if (ans == 2 * cnt[0]) {
    for (auto &k : flow.edges) {
      if (k.flow == 1) g[k.v].push_back(k.u), g[k.u].push_back(k.v);
    }
    vector<vector<int>> ans;
    for (int i = 1; i <= n; ++i) {
      if (!vis[i]) {
        vector<int> u;
        dfs(i, u);
        ans.push_back(u);
      }
    }
    cout << (long long)ans.size() << "\n";
    for (auto &j : ans) {
      cout << (long long)j.size() << " ";
      for (auto &k : j) cout << k << " ";
      cout << "\n";
    }
  } else {
    cout << "Impossible\n";
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  sieve();
  int TESTS = 1;
  while (TESTS--) _runtimeTerror_();
  return 0;
}