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;
vector<bool> mk_primes(const int n) {
  vector<bool> pr(n, true);
  pr[0] = pr[1] = false;
  for (int i = 1; i < n; ++i) {
    if (pr[i]) {
      for (int j = i * i; j < n; j += i) {
        pr[j] = false;
      }
    }
  }
  return pr;
}
int mk_flux(const int surs, const int dest, const vector<vector<int>>& vec,
            const vector<vector<int>>& cap, vector<vector<int>>& flux) {
  const int n = vec.size();
  vector<int> tata(n, -1);
  queue<int> de_viz;
  int rez = 0;
  while (true) {
    fill(begin(tata), end(tata), -1);
    de_viz.push(surs);
    while (!de_viz.empty()) {
      const int cur = de_viz.front();
      de_viz.pop();
      for (const auto next : vec[cur]) {
        if (tata[next] == -1 && flux[cur][next] < cap[cur][next]) {
          tata[next] = cur;
          if (next != dest) {
            de_viz.push(next);
          }
        }
      }
    }
    if (tata[dest] == -1) {
      return rez;
    }
    for (const auto frunza : vec[dest]) {
      if (flux[frunza][dest] == cap[frunza][dest] || tata[frunza] == -1) {
        continue;
      }
      tata[dest] = frunza;
      int fl = 1000000;
      for (int i = dest; i != surs; i = tata[i]) {
        fl = min(fl, cap[tata[i]][i] - flux[tata[i]][i]);
      }
      rez += fl;
      for (int i = dest; i != surs; i = tata[i]) {
        flux[tata[i]][i] += fl;
        flux[i][tata[i]] -= fl;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (auto& x : v) {
    cin >> x;
  }
  if (2 * count_if(begin(v), end(v), [](const int x) { return x % 2 == 0; }) !=
      n) {
    cout << "Impossible" << endl;
    return 0;
  }
  vector<int> which_left, which_right;
  for (int i = 0; i < n; ++i) {
    (v[i] % 2 == 0 ? which_left : which_right).push_back(i);
  }
  const int surs = 0, dest = 1, st_left = 2, st_right = 2 + n / 2, sz = n + 2;
  const auto is_prime = mk_primes(20 * 1000 + 10);
  vector<vector<int>> vec(sz);
  vector<vector<int>> flux(sz, vector<int>(sz, 0)), cap(sz, vector<int>(sz, 0));
  auto add_muc = [&](const int x, const int y, const int c) {
    vec[x].push_back(y);
    vec[y].push_back(x);
    cap[x][y] = c;
  };
  for (int i = 0; i < n / 2; ++i) {
    add_muc(surs, st_left + i, 2);
    add_muc(st_right + i, dest, 2);
  }
  for (int i = 0; i < n / 2; ++i) {
    for (int j = 0; j < n / 2; ++j) {
      if (is_prime[v[which_left[i]] + v[which_right[j]]]) {
        add_muc(st_left + i, st_right + j, 1);
      }
    }
  }
  const int n_flux = mk_flux(surs, dest, vec, cap, flux);
  if (n_flux != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  vector<vector<int>> cicluri;
  vector<bool> viz(n / 2, false);
  for (int i = 0; i < n / 2; ++i) {
    if (!viz[i]) {
      cicluri.emplace_back(0, 0);
      for (int j = i; !viz[j];) {
        viz[j] = true;
        const int next1 =
            find(begin(flux[j + st_left]), end(flux[j + st_left]), 1) -
            begin(flux[j + st_left]) - st_right;
        flux[j + st_left][next1 + st_right] =
            flux[next1 + st_right][j + st_left] = 0;
        const int next2 = find(begin(flux[next1 + st_right]),
                               end(flux[next1 + st_right]), -1) -
                          begin(flux[next1 + st_right]) - st_left;
        flux[next2 + st_left][next1 + st_right] =
            flux[next1 + st_right][next2 + st_left] = 0;
        cicluri.back().push_back(which_left[j]);
        cicluri.back().push_back(which_right[next1]);
        j = next2;
      }
    }
  }
  cout << cicluri.size() << '\n';
  for (const auto& c : cicluri) {
    cout << c.size() << ' ';
    for (const auto x : c) {
      cout << x + 1 << ' ';
    }
    cout << '\n';
  }
  return 0;
}