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;
const int maxn = 233;
const int maxm = 233333;
const int inf = 987654321;
int z[maxm];
vector<int> pr;
int a[maxn];
int f[maxn][maxn];
int stk[maxn], d[maxn], Now[maxn], Limit[maxn], I[maxn];
vector<int> g[maxn];
vector<int> odd, even;
vector<vector<int> > ans;
int T;
bool P[maxn];
queue<int> que;
bool Re_num() {
  for (int i = 0; i <= T; ++i) d[i] = 0;
  d[0] = 1;
  while (!que.empty()) que.pop();
  que.push(0);
  while (!que.empty()) {
    int u = que.front();
    que.pop();
    for (int i = 0; i < (int)g[u].size(); ++i)
      if (f[u][g[u][i]] > 0 && d[g[u][i]] == 0) {
        d[g[u][i]] = d[u] + 1;
        que.push(g[u][i]);
      }
  }
  return d[T] > 0;
}
int Dinic() {
  int t = 1;
  stk[t] = 0;
  Now[t] = 0;
  Limit[t] = inf;
  I[t] = 0;
  while (t) {
    if (stk[t] == T) {
      Now[t - 1] += Limit[t];
      f[stk[t - 1]][T] -= Limit[t];
      --t;
      continue;
    }
    bool Next = 0;
    int u = stk[t];
    for (; I[t] < (int)(g[u].size()) && !Next && Now[t] < Limit[t]; ++I[t])
      if (f[u][g[u][I[t]]] > 0 && d[g[u][I[t]]] == d[u] + 1) {
        stk[t + 1] = g[u][I[t]];
        Now[t + 1] = 0;
        Limit[t + 1] = min(f[u][g[u][I[t]]], Limit[t] - Now[t]);
        I[t + 1] = 0;
        Next = 1;
      }
    if (Next)
      ++t;
    else {
      Now[t - 1] += Now[t];
      f[stk[t - 1]][stk[t]] -= Now[t];
      f[stk[t]][stk[t - 1]] += Now[t];
      if (Now[t] < Limit[t]) d[stk[t]] = -1;
      --t;
    }
  }
  return Now[1];
}
int main() {
  for (int i = 2; i <= 20000; ++i) {
    if (!z[i]) pr.push_back(i);
    for (int j = 0; j < (int)pr.size() && i * pr[j] <= 20000; ++j) {
      z[i * pr[j]] = 1;
      if (i % pr[j] == 0) break;
    }
  }
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    if (a[i] & 1)
      odd.push_back(i);
    else
      even.push_back(i);
  }
  if (odd.size() != even.size()) {
    printf("Impossible\n");
    return 0;
  }
  T = n + 1;
  int m = n >> 1;
  for (int i = 1; i <= m; ++i) {
    g[0].push_back(i);
    f[0][i] = 2;
  }
  for (int i = m + 1; i <= n; ++i) {
    g[i].push_back(T);
    f[i][T] = 2;
  }
  for (int i = 0; i < m; ++i)
    for (int j = 0; j < m; ++j)
      if (!z[a[odd[i]] + a[even[j]]]) {
        g[i + 1].push_back(j + m + 1);
        g[j + m + 1].push_back(i + 1);
        f[i + 1][j + m + 1] = 1;
      }
  int sum = 0;
  while (Re_num()) sum += Dinic();
  if (sum < n)
    printf("Impossible\n");
  else {
    for (int i = 1; i <= m; ++i)
      if (!P[i]) {
        vector<int> tmp;
        tmp.clear();
        for (int u = i, v = 0; !P[u];) {
          P[u] = 1;
          for (int j = 0; j < (int)g[u].size(); ++j)
            if (f[g[u][j]][u] == 1 && g[u][j] != v) {
              v = g[u][j];
              break;
            }
          tmp.push_back(odd[u - 1]);
          tmp.push_back(even[v - 1 - m]);
          for (int j = 0; j < (int)g[v].size(); ++j)
            if (f[v][g[v][j]] == 1 && g[v][j] != u) {
              u = g[v][j];
              break;
            }
        }
        ans.push_back(tmp);
      }
    printf("%d\n", (int)ans.size());
    for (int i = 0; i < (int)ans.size(); ++i) {
      printf("%d", (int)ans[i].size());
      for (int j = 0; j < (int)ans[i].size(); ++j) printf(" %d", ans[i][j]);
      printf("\n");
    }
  }
  return 0;
}