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;
const long long INF = 1e9 + 7;
const long long M = 1000;
struct Edge {
  long long from, to, cap, flow;
};
struct Dinic {
  long long s, t;
  vector<Edge> edges;
  vector<long long> G[M];
  bool vis[M];
  long long d[M];
  long long cur[M];
  void addEdge(long long from, long long to, long long cap) {
    edges.push_back({from, to, cap, 0});
    edges.push_back({to, from, 0, 0});
    G[from].push_back(edges.size() - 2);
    G[to].push_back(edges.size() - 1);
  }
  bool BFS() {
    memset(vis, 0, sizeof(vis));
    queue<long long> q;
    q.push(s);
    d[s] = 0;
    vis[s] = 1;
    while (!q.empty()) {
      long long u = q.front();
      q.pop();
      for (long long id : G[u]) {
        Edge &e = edges[id];
        if (!vis[e.to] && e.cap > e.flow) {
          vis[e.to] = 1;
          d[e.to] = d[u] + 1;
          q.push(e.to);
        }
      }
    }
    return vis[t];
  }
  long long DFS(long long u, long long a) {
    if (u == t || a == 0) return a;
    long long flow = 0, f;
    for (long long &i = cur[u]; i < (long long)G[u].size(); ++i) {
      Edge &e = edges[G[u][i]];
      if (d[u] + 1 == d[e.to] && (f = DFS(e.to, min(a, e.cap - e.flow))) > 0) {
        e.flow += f;
        edges[G[u][i] ^ 1].flow -= f;
        flow += f;
        a -= f;
        if (a == 0) break;
      }
    }
    return flow;
  }
  long long maxflow(long long _s, long long _t) {
    s = _s;
    t = _t;
    long long flow = 0;
    while (BFS()) {
      memset(cur, 0, sizeof(cur));
      flow += DFS(s, INF);
    }
    return flow;
  }
} dinic;
bool is_prime(long long x) {
  if (x < 2) return false;
  for (long long i = 2; i <= x / i; i++)
    if (x % i == 0) return false;
  return true;
}
long long a[210], vis[210], cnt;
vector<pair<long long, long long>> odd, even;
vector<long long> res[300];
void dfs(long long x) {
  vis[x] = 1;
  res[cnt].push_back(x);
  for (long long i : dinic.G[x]) {
    Edge e = dinic.edges[i];
    if (e.to != 0 && e.to != 800 && !vis[e.to] && abs(e.flow) == 1) {
      dfs(e.to);
    }
  }
}
signed main() {
  long long n, tmp, s_ = 0, t_ = 800;
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] & 1) {
      odd.emplace_back(i, a[i]);
      dinic.addEdge(s_, i, 2);
    } else {
      even.emplace_back(i, a[i]);
      dinic.addEdge(i, t_, 2);
    }
  }
  for (auto i : odd) {
    for (auto j : even) {
      if (is_prime(i.second + j.second)) {
        dinic.addEdge(i.first, j.first, 1);
      }
    }
  }
  if (dinic.maxflow(s_, t_) == n) {
    memset(vis, 0, sizeof vis);
    for (auto i : dinic.G[0]) {
      Edge e = dinic.edges[i];
      if (!vis[e.to] && e.flow == 2) {
        dfs(e.to);
        cnt++;
      }
    }
    printf("%lld\n", cnt);
    for (long long i = 0; i < cnt; i++) {
      printf("%lld ", res[i].size());
      for (auto j : res[i]) {
        printf("%lld ", j);
      }
      printf("\n");
    }
  } else {
    printf("Impossible\n");
  }
}
