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>
#pragma GCC optimize(2)
using namespace std;
using ll = long long;
const ll inf = 0x3f3f3f3f3f3f3f3f;
const int maxv = 420;
const int maxe = 40450;
int s, t;
struct edge_node {
  int to, nxt;
  ll flow;
} edge[maxe << 1];
int head[maxv], id = 2, cur[maxv];
inline void add_edge(int u, int v, ll flow) {
  edge[id] = edge_node{v, head[u], flow};
  head[u] = id++;
  edge[id] = edge_node{u, head[v], 0};
  head[v] = id++;
}
int depth[maxv];
bool bfs() {
  memcpy(cur, head, sizeof(cur));
  memset(depth, 0, sizeof(depth));
  queue<int> que;
  depth[s] = 1;
  que.emplace(s);
  while (!que.empty()) {
    int u = que.front();
    que.pop();
    for (int i = head[u]; i; i = edge[i].nxt) {
      int v = edge[i].to;
      ll flow = edge[i].flow;
      if (flow != 0 && depth[v] == 0) {
        depth[v] = depth[u] + 1;
        que.emplace(v);
      }
    }
  }
  return depth[t] != 0;
}
ll dfs(int u, ll flow) {
  if (u == t) return flow;
  ll res = 0;
  for (int i = cur[u]; i; i = edge[i].nxt) {
    cur[u] = i;
    int v = edge[i].to;
    if (depth[v] == depth[u] + 1 && edge[i].flow != 0) {
      ll temp = dfs(v, min(flow, edge[i].flow));
      edge[i].flow -= temp;
      edge[i ^ 1].flow += temp;
      res += temp;
      flow -= temp;
      if (flow == 0) break;
    }
  }
  if (flow != 0 || res == 0) depth[u] = 0;
  return res;
}
inline ll dinic() {
  ll ans = 0;
  while (bfs()) {
    ans += dfs(s, inf);
  }
  return ans;
}
namespace euler {
const int maxn = 20020;
int prime[maxn], id;
bool is_prime[maxn];
void euler(int n) {
  id = 0;
  memset(is_prime, true, sizeof(is_prime));
  is_prime[1] = false;
  for (int i = 2; i <= n; ++i) {
    if (is_prime[i]) {
      prime[++id] = i;
    }
    for (int j = 1; j <= id && i * prime[j] <= n; ++j) {
      is_prime[i * prime[j]] = false;
      if (i % prime[j] == 0) {
        break;
      }
    }
  }
}
}  // namespace euler
const int maxn = 220;
int n;
ll a[maxn];
bool vis[maxn];
vector<vector<int>> ans;
void dfs2(int u) {
  vis[u] = true;
  ans.back().emplace_back(u);
  for (int i = head[u]; i; i = edge[i].nxt) {
    int v = edge[i].to;
    ll w = edge[i].flow;
    if (a[u] & 1) {
      if (v != s && w == 0 && !vis[v]) {
        dfs2(v);
      }
    } else {
      if (v != t && w != 0 && !vis[v]) {
        dfs2(v);
      }
    }
  }
}
signed main() {
  std::ios_base::sync_with_stdio(false), std::cin.tie(0), std::cout.tie(0);
  euler::euler(20000);
  cin >> n;
  s = 0, t = n + 1;
  int cnt0 = 0, cnt1 = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] & 1) {
      cnt1++;
    } else {
      cnt0++;
    }
  }
  if (cnt1 != cnt0) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    if (!(a[i] & 1)) {
      continue;
    }
    for (int j = 1; j <= n; ++j) {
      if (i != j) {
        if (euler::is_prime[a[i] + a[j]]) {
          add_edge(i, j, 1);
        }
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (a[i] & 1)
      add_edge(s, i, 2);
    else
      add_edge(i, t, 2);
  }
  ll max_flow = dinic();
  if (max_flow != cnt0 * 2) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    if ((a[i] & 1) && !vis[i]) {
      ans.emplace_back(vector<int>());
      dfs2(i);
    }
  }
  cout << ans.size() << '\n';
  for (const auto& vec : ans) {
    cout << vec.size() << " ";
    for (const auto& x : vec) {
      cout << x << " ";
    }
    cout << "\n";
  }
  return 0;
}