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.
#include <bits/stdc++.h>
using namespace std;
struct edge {
  int a, b, cap, flow;
  edge() {}
  edge(int a, int b, int cap, int flow) {
    this->a = a;
    this->b = b;
    this->cap = cap;
    this->flow = flow;
  }
};
int n, s, t, dist[205], ptr[202];
vector<int> adj[205];
vector<edge> edgeList;
void add_edge(int a, int b, int cap) {
  adj[a].push_back(edgeList.size());
  edgeList.push_back(edge(a, b, cap, 0));
  adj[b].push_back(edgeList.size());
  edgeList.push_back(edge(b, a, 0, 0));
}
bool bfs() {
  memset(dist, -1, sizeof(dist));
  queue<int> qq;
  dist[s] = 0;
  qq.push(s);
  while (!qq.empty()) {
    int v = qq.front();
    qq.pop();
    for (int i = 0; i < (int)adj[v].size(); i++) {
      int id = adj[v][i];
      int vv = v ^ edgeList[id].a ^ edgeList[id].b;
      if (dist[vv] == -1 && edgeList[id].flow < edgeList[id].cap) {
        dist[vv] = 1 + dist[v];
        qq.push(vv);
      }
    }
  }
  return (dist[t] != -1);
}
int dfs(int v, int flow) {
  if (!flow) return 0;
  if (v == t) return flow;
  for (; ptr[v] < (int)adj[v].size(); ptr[v]++) {
    int id = adj[v][ptr[v]];
    int vv = v ^ edgeList[id].a ^ edgeList[id].b;
    if (dist[vv] != dist[v] + 1) continue;
    int pushed = dfs(vv, min(flow, edgeList[id].cap - edgeList[id].flow));
    if (pushed > 0) {
      edgeList[id].flow += pushed;
      edgeList[1 ^ id].flow -= pushed;
      return pushed;
    }
  }
  return 0;
}
int dinitz() {
  int ans = 0;
  while (1) {
    if (!bfs()) break;
    memset(ptr, 0, sizeof(ptr));
    while (int pushed = dfs(s, 1000000000) > 0) ans += pushed;
  }
  return ans;
}
int odd[300], even[300], sieve[50000];
bool done[300];
vector<vector<int>> res;
vector<int> cur;
inline void go(int u) {
  cur.emplace_back(u);
  done[u] = 1;
  for (auto id : adj[u]) {
    int v = u ^ edgeList[id].a ^ edgeList[id].b;
    if (edgeList[id].flow == 0 || done[v]) continue;
    go(v);
  }
}
int main() {
  memset(sieve, 0, sizeof(sieve));
  ;
  for (int x = 2; x < 20000; x++) {
    if (sieve[x]) continue;
    for (int y = x + x; y < 20000; y += x) sieve[y] = 1;
  }
  scanf("%d", &n);
  ;
  int arr[n + 1];
  for (int x = 1; x <= n; x++) scanf("%d", &arr[x]);
  ;
  int o = 0, e = 0;
  for (int x = 1; x <= n; x++) {
    if (arr[x] & 1)
      odd[o++] = x;
    else
      even[e++] = x;
  }
  s = 0, t = n + 1;
  done[s] = done[t] = 1;
  for (int x = 0; x < e; x++) add_edge(s, even[x], 2);
  for (int x = 0; x < o; x++) add_edge(odd[x], t, 2);
  for (int x = 0; x < e; x++)
    for (int y = 0; y < o; y++)
      if (!sieve[arr[even[x]] + arr[odd[y]]]) add_edge(even[x], odd[y], 1);
  if (dinitz() != n || o != e) return 0 * printf("Impossible\n");
  for (int x = 1; x <= n; x++) {
    if (!done[x]) {
      cur.clear();
      go(x);
      res.push_back(cur);
    }
  }
  printf("%d\n", (int)res.size());
  for (auto x : res) {
    printf("%d ", (int)x.size());
    for (auto y : x) printf("%d ", y);
    printf("\n");
  }
}
