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 int MAXV = 512;
const int MAXN = 512;
struct Edge {
  int to, cap;
  Edge(int a, int b) {
    to = a;
    cap = b;
  }
};
vector<int> adj[MAXV];
vector<Edge> edge;
int ptr[MAXV], dinic_dist[MAXV];
inline void addEdge(int u, int v, int cap) {
  adj[u].push_back(edge.size());
  edge.push_back(Edge(v, cap));
  adj[v].push_back(edge.size());
  edge.push_back(Edge(u, 0));
}
bool dinic_bfs(int _s, int _t) {
  memset(dinic_dist, -1, sizeof dinic_dist);
  dinic_dist[_s] = 0;
  queue<int> q;
  q.push(_s);
  while (!q.empty() && dinic_dist[_t] == -1) {
    int v = q.front();
    q.pop();
    for (int a = 0; a < adj[v].size(); ++a) {
      int ind = adj[v][a];
      int nxt = edge[ind].to;
      if (dinic_dist[nxt] == -1 && edge[ind].cap) {
        dinic_dist[nxt] = dinic_dist[v] + 1;
        q.push(nxt);
      }
    }
  }
  return dinic_dist[_t] != -1;
}
int dinic_dfs(int v, int _t, int flow) {
  if (v == _t) return flow;
  for (int &a = ptr[v]; a < (int)adj[v].size(); ++a) {
    int ind = adj[v][a];
    int nxt = edge[ind].to;
    if (dinic_dist[nxt] == dinic_dist[v] + 1 && edge[ind].cap) {
      int got = dinic_dfs(nxt, _t, min(flow, edge[ind].cap));
      if (got) {
        edge[ind].cap -= got;
        edge[ind ^ 1].cap += got;
        return got;
      }
    }
  }
  return 0;
}
int dinic(int _s, int _t) {
  int ret = 0, got;
  while (dinic_bfs(_s, _t)) {
    memset(ptr, 0, sizeof ptr);
    while ((got = dinic_dfs(_s, _t, 0x3F3F3F3F))) ret += got;
  }
  return ret;
}
inline void dinic_clear() {
  for (int a = 0; a < MAXV; ++a) adj[a].clear();
  edge.clear();
}
int v[MAXN];
pair<int, int> p[MAXN];
vector<int> t[MAXN];
bool vis[MAXN];
bool pr[21234];
void sieve() {
  int x = 21234;
  for (int i = 2; i < x; ++i) pr[i] = true;
  pr[0] = false;
  pr[1] = false;
  for (int i = 2; i < x; ++i) {
    if (!pr[i]) continue;
    for (int j = i * i; j < x; j += i) pr[j] = false;
  }
}
int main() {
  sieve();
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) scanf("%d", v + i);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      if (i == j) continue;
      if (!pr[v[i] + v[j]]) continue;
      if (!(v[i] & 1)) continue;
      addEdge(i + 1, j + 1, 1);
    }
  for (int i = 0; i < n; ++i) {
    if (v[i] & 1)
      addEdge(0, i + 1, 2);
    else
      addEdge(i + 1, 250, 2);
  }
  int ans = dinic(0, 250);
  if (ans < n) {
    cout << "Impossible\n";
    return 0;
  }
  for (int x = 1; x <= n + n; ++x) {
    for (int i = 0; i < adj[x].size(); ++i) {
      Edge e = edge[adj[x][i]];
      if (e.to != 0 && e.to != 500) {
        if (v[x - 1] & 1) {
          if (e.cap != 0) continue;
          p[x - 1].second = p[x - 1].first;
          p[x - 1].first = e.to - 1;
        } else {
          if (e.cap != 1) continue;
          p[x - 1].second = p[x - 1].first;
          p[x - 1].first = e.to - 1;
        }
      }
    }
  }
  ans = 0;
  for (int x = 0; x < n; ++x) {
    if (vis[x]) continue;
    t[ans].push_back(x);
    vis[x] = true;
    int y = p[x].first;
    while (y != x) {
      vis[y] = true;
      t[ans].push_back(y);
      if (vis[p[y].first])
        y = p[y].second;
      else
        y = p[y].first;
    }
    ++ans;
  }
  cout << ans << endl;
  for (int i = 0; i < ans; ++i) {
    printf("%d", (int)t[i].size());
    for (int j = 0; j < t[i].size(); ++j) printf(" %d", t[i][j] + 1);
    printf("\n");
  }
  return 0;
}
