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>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int inf = 1000000007;
const long long linf = 1000000000000000000LL;
const unsigned long long ulinf = (1ULL << 63) - 10ULL;
const double eps = 0.000001;
const double pi = 3.14159265358979323846;
template <class T>
T abs(T a) {
  return a >= 0 ? a : -a;
}
template <class T>
int sign(T a) {
  return a > eps ? 1 : a < -eps ? -1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T mod(T a, T b) {
  T ret = a % b;
  if (ret < 0) ret += b;
  return ret;
}
template <class T>
T lowbit(T x) {
  return x & -x;
}
long long addmod(long long a, long long b, long long c) {
  return ((a + b) % c + c) % c;
}
long long mulmod(long long a, long long b, long long c) {
  if (b == 0LL) return 0LL;
  long long ret = mulmod(a, b >> 1, c);
  ret = (ret + ret) % c;
  if (b & 1LL) ret = (ret + a) % c;
  return ret;
}
long long powmod(long long a, long long b, long long c) {
  if (b == 0LL) return 1LL;
  long long ret = powmod(a, b >> 1, c);
  ret = ret * ret % c;
  if (b & 1LL) ret = ret * a % c;
  return ret;
}
long long modinv(long long a, long long b) { return powmod(a, b - 2LL, b); }
template <class T>
void maxe(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void mine(T &a, T b) {
  if (a > b) a = b;
}
int iszero(double a) { return a <= eps && a >= -eps; }
template <class T>
void geti(T &a) {
  a = 0;
  int b = 0;
  char c;
  while ((c = getchar()) == ' ' || c == '\n')
    ;
  if (c == '-')
    b = 1;
  else
    a = c - 48;
  while ((c = getchar()) != ' ' && c != '\n') a = a * 10 + c - 48;
  if (b) a = -a;
}
void fileio_in_out() {
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
}
void fileio_txt() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
const int N = 222;
const int M = 22222;
const int K = 20;
const long long md = inf;
int test;
int n, m, k, ans;
int p[M];
int a[N];
vector<int> v0, v1;
vector<int> v[2][N];
vector<int> aa[N];
int t1[N], t2[N];
int uN, vN;
int g[N][N];
int linker[N];
bool used[N];
bool dfs(int u) {
  int v;
  for (v = 0; v < vN; v++)
    if (g[u][v] && !used[v]) {
      used[v] = true;
      if (linker[v] == -1 || dfs(linker[v])) {
        linker[v] = u;
        return true;
      }
    }
  return false;
}
int hungary() {
  int res = 0;
  int u;
  memset(linker, -1, sizeof(linker));
  for (u = 0; u < uN; u++) {
    memset(used, 0, sizeof(used));
    if (dfs(u)) res++;
  }
  return res;
}
void init() {
  for (int i = 2; i < M; i++)
    for (int j = i + i; j < M; j += i) p[j] = 1;
}
int getans() {
  for (int i = 1; i <= n; i++)
    if (a[i] & 1)
      v1.push_back(i);
    else
      v0.push_back(i);
  if (v0.size() != v1.size()) return 0;
  n /= 2;
  uN = vN = n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (!p[a[v0[i]] + a[v1[j]]]) g[i][j] = 1;
  int t = hungary();
  if (t != n) return 0;
  for (int i = 0; i < n; i++) {
    t1[linker[i]] = i;
    g[linker[i]][i] = 0;
  }
  t = hungary();
  if (t != n) return 0;
  for (int i = 0; i < n; i++) t2[i] = linker[i];
  return 1;
}
int vis[N];
int main() {
  init();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  ans = getans();
  if (ans) {
    ans = 0;
    for (int i = 0; i < n; i++)
      if (!vis[i]) {
        vis[i] = 1;
        ans++;
        aa[ans].push_back(v0[i]);
        aa[ans].push_back(v1[t1[i]]);
        for (int j = t2[t1[i]]; j != i; j = t2[t1[j]]) {
          vis[j] = 1;
          aa[ans].push_back(v0[j]);
          aa[ans].push_back(v1[t1[j]]);
        }
      }
    printf("%d\n", ans);
    for (int i = 1; i <= ans; i++) {
      printf("%d", aa[i].size());
      for (int j = 0; j < aa[i].size(); j++) printf(" %d", aa[i][j]);
      puts("");
    }
  } else
    puts("Impossible");
  return 0;
}