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>
using namespace std;
int f[305][305] = {};
int g[305][305] = {};
int vis[305];
int path[305];
int pre[305];
list<int> qu;
int val[305];
int notprime[100005] = {};
int N;
list<int> List[305];
int primes(int n) {
  int i, j;
  int nhalf = n / 2 + 1;
  for (i = 2; i < nhalf; ++i)
    if (!notprime[i])
      for (j = i;; ++j) {
        if ((long long)i * j >= n) break;
        notprime[i * j] = 1;
      }
  return 0;
}
int build_graph() {
  int i, j;
  int s = 0;
  if (N & 1) return 1;
  for (i = 1; i <= N; ++i) {
    if (val[i] & 1) {
      f[0][i] = 2;
      ++s;
    } else {
      f[i][N + 1] = 2;
    }
  }
  if (s * 2 != N) return 1;
  for (i = 1; i <= N; ++i)
    if (val[i] & 1)
      for (j = 1; j <= N; ++j)
        if (!notprime[val[i] + val[j]]) {
          f[i][j] = 1;
        }
  return 0;
}
int find_path() {
  int u, v;
  int i;
  int k;
  qu.clear();
  memset(vis, 0, sizeof(vis));
  vis[0] = 1;
  qu.push_front(0);
  while (!qu.empty()) {
    if (vis[N + 1]) break;
    u = qu.front();
    qu.pop_front();
    for (i = 0; i <= N + 1; ++i)
      if (f[u][i] > g[u][i]) {
        if (!vis[i]) {
          vis[i] = 1;
          pre[i] = u;
          qu.push_back(i);
        }
      }
  }
  if (!vis[N + 1]) return 1;
  k = 0;
  u = N + 1;
  while (u != 0) {
    path[k++] = u;
    u = pre[u];
  }
  path[k++] = 0;
  for (i = k - 1; i > 0; --i) {
    ++g[path[i]][path[i - 1]];
    --g[path[i - 1]][path[i]];
  }
  return 0;
}
int flow() {
  int s = 0;
  while (1) {
    if (find_path()) break;
    ++s;
  }
  if (s != N)
    return 1;
  else
    return 0;
}
int circle(int v, int t) {
  int k = 0;
  int i;
  int u = v;
  while (!(k && u == v)) {
    ++k;
    List[t].push_back(u);
    g[0][u] = 0;
    g[u][0] = 0;
    for (i = 1; i <= N; ++i)
      if (g[u][i]) {
        g[u][i] = 0;
        g[i][u] = 0;
        g[0][i] = 0;
        u = i;
        break;
      }
  }
  return 0;
}
int main() {
  int i;
  int t;
  cin >> N;
  primes(100005);
  for (i = 1; i <= N; ++i) cin >> val[i];
  if (build_graph() || flow()) {
    printf("Impossible\n");
    exit(0);
  }
  t = 0;
  for (i = 1; i <= N; ++i)
    if (g[0][i]) circle(i, t++);
  cout << t << endl;
  for (i = 0; i < t; ++i) {
    cout << List[i].size();
    while (!List[i].empty()) {
      cout << " " << List[i].front();
      List[i].pop_front();
    }
    cout << endl;
  }
  int key = 0;
  return 0;
}