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 from, to, cap, flow, pre;
} e[405 * 405];
int cou, h[405], s, t, d[405], cur[405];
bool vis[405];
inline void MakeEdge(Edge &x, int t1 = 0, int t2 = 0, int t3 = 0, int t4 = 0,
                     int t5 = 0) {
  x.from = t1, x.to = t2, x.cap = t3, x.flow = t4, x.pre = t5;
}
inline void Addedge(int from, int to, int cap) {
  cou++;
  MakeEdge(e[cou], from, to, cap, 0, h[from]);
  h[from] = cou;
  cou++;
  MakeEdge(e[cou], to, from, 0, 0, h[to]);
  h[to] = cou;
}
bool BFS() {
  memset(vis, 0, sizeof(vis));
  int i, x, v;
  queue<int> q;
  q.push(s), d[s] = 0, vis[s] = 1;
  while (!q.empty()) {
    x = q.front();
    q.pop();
    for (i = h[x]; i; i = e[i].pre) {
      v = e[i].to;
      if (!vis[v] && e[i].cap > e[i].flow) {
        q.push(v), vis[v] = 1;
        d[v] = d[x] + 1;
        if (v == t) return 1;
      }
    }
  }
  return 0;
}
int DFS(int x, int a) {
  if (x == t || a == 0) return a;
  int &i = cur[x];
  int flow = 0, f, v;
  for (; i; i = e[i].pre) {
    v = e[i].to;
    if (d[v] == d[x] + 1 && (f = DFS(v, min(a, e[i].cap - e[i].flow))) > 0) {
      flow += f;
      e[i].flow += f;
      e[((i - 1) ^ 1) + 1].flow -= f;
      a -= f;
      if (a == 0) break;
    }
  }
  return flow;
}
int Maxflow() {
  int i, flow = 0;
  while (BFS()) {
    for (i = s; i <= t; i++) cur[i] = h[i];
    flow += DFS(s, 1000000000);
  }
  return flow;
}
bool check_prime2(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
int n, c1, c2, cnt;
int a[405];
bool vs[405];
vector<int> p[405];
void dfs(int x, int y) {
  y ^= 1;
  p[cnt].push_back(x);
  vs[x] = 1;
  int i;
  for (i = h[x]; i; i = e[i].pre)
    if (!vs[e[i].to] && (e[i].cap - e[i].flow) == y) dfs(e[i].to, y);
}
int main() {
  int i, j, t1;
  cin >> n;
  s = 0, t = n + 1;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] & 1) {
      Addedge(s, i, 2);
      c1++;
    } else {
      Addedge(i, t, 2);
      c2++;
    }
  }
  if (c1 != c2) {
    printf("Impossible\n");
    return 0;
  }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++)
      if ((a[i] & 1) && check_prime2(a[i] + a[j])) Addedge(i, j, 1);
  if (Maxflow() != n) {
    printf("Impossible\n");
    return 0;
  }
  for (i = 1; i <= n; i++)
    if (!vs[i]) {
      cnt++;
      dfs(i, a[i] & 1);
    }
  vs[s] = vs[t] = 1;
  cout << cnt << endl;
  for (i = 1; i <= cnt; i++) {
    t1 = p[i].size();
    cout << t1 << ' ';
    for (j = 0; j < t1; j++) printf("%d ", p[i][j]);
    cout << endl;
  }
  return 0;
}
