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;
void RI() {}
template <typename... T>
void RI(int &head, T &...tail) {
  scanf("%d", &head);
  RI(tail...);
}
struct Maxflow {
  struct E {
    int to, cap, rev, rcap, ucap;
    E() {}
    E(int _to, int _cap, int _rev)
        : to(_to), cap(_cap), rev(_rev), rcap(_cap) {}
  };
  int n;
  vector<vector<E> > e;
  vector<vector<E>::iterator> cur;
  vector<int> dis;
  void init(int _n) {
    n = _n;
    e.resize(n);
    cur.resize(n);
    dis.resize(n);
    for (int i = 0; i < int(n); i++) e[i].clear();
  }
  void add(int a, int b, int c) {
    if (a == b) return;
    e[a].push_back(E(b, c, e[b].size()));
    e[b].push_back(E(a, 0, e[a].size() - 1));
  }
  bool bfs() {
    fill(dis.begin(), dis.end(), -1);
    queue<int> q;
    dis[0] = 0;
    q.push(0);
    while (!q.empty() && dis[n - 1] == -1) {
      int p = q.front();
      q.pop();
      for (auto it = (e[p]).begin(); it != (e[p]).end(); it++) {
        if (it->cap == 0 || dis[it->to] != -1) continue;
        dis[it->to] = dis[p] + 1;
        q.push(it->to);
      }
    }
    return dis[n - 1] != -1;
  }
  long long go(int p, long long c) {
    if (p == n - 1) return c;
    long long ret = 0;
    for (; cur[p] != e[p].end(); cur[p]++) {
      if (cur[p]->cap == 0 || dis[cur[p]->to] != dis[p] + 1) continue;
      long long now = go(cur[p]->to, min((long long)cur[p]->cap, c - ret));
      ret += now;
      cur[p]->cap -= now;
      e[cur[p]->to][cur[p]->rev].cap += now;
      if (ret == c) break;
    }
    if (ret == 0) dis[p] = -1;
    return ret;
  }
  long long maxflow() {
    long long ret = 0;
    while (bfs()) {
      for (int i = 0; i < int(n); i++) cur[i] = e[i].begin();
      ret += go(0, 1LL << 60);
    }
    return ret;
  }
  bool _addPath(int wh, vector<vector<int> > &ans) {
    if (wh == n - 1) {
      ans.push_back(vector<int>());
      ans.back().push_back(wh);
      return true;
    }
    for (auto it = (e[wh]).begin(); it != (e[wh]).end(); it++)
      if (it->ucap > 0 && _addPath(it->to, ans)) {
        it->ucap--;
        ans.back().push_back(wh);
        return true;
      }
    return false;
  }
  vector<vector<int> > getPath() {
    vector<vector<int> > ans;
    for (auto it = (e).begin(); it != (e).end(); it++)
      for (auto jt = (*it).begin(); jt != (*it).end(); jt++)
        jt->ucap = max(0, jt->rcap - jt->cap);
    while (_addPath(0, ans)) reverse(ans.back().begin(), ans.back().end());
    return ans;
  }
} flow;
bool pt[51400];
void predo() {
  for (int i = 2; i < 51400; i++)
    if (!pt[i])
      for (int j = i + i; j < 51400; j += i) pt[j] = 1;
}
int n, a[210];
vector<int> e[210], sol;
bool vis[210];
void dfs(int p) {
  sol.push_back(p);
  vis[p] = 1;
  for (auto it = (e[p]).begin(); it != (e[p]).end(); it++)
    if (!vis[*it]) {
      dfs(*it);
      break;
    }
}
int main() {
  predo();
  RI(n);
  for (int i = (1); i <= int(n); i++) RI(a[i]);
  int sink = n + 1;
  flow.init(sink + 1);
  for (int i = (1); i <= int(n); i++) {
    if (a[i] % 2 == 0)
      flow.add(0, i, 2);
    else
      flow.add(i, sink, 2);
  }
  for (int i = (1); i <= int(n); i++)
    if (a[i] % 2 == 0)
      for (int j = (1); j <= int(n); j++)
        if (!pt[a[i] + a[j]]) flow.add(i, j, 1);
  int mf = flow.maxflow();
  if (mf != n) {
    puts("Impossible");
    return 0;
  }
  auto ps = flow.getPath();
  for (auto it = (ps).begin(); it != (ps).end(); it++) {
    assert(((int)(*it).size()) == 4);
    int x = it->at(1);
    int y = it->at(2);
    e[x].push_back(y);
    e[y].push_back(x);
  }
  for (int i = (1); i <= int(n); i++) assert(((int)(e[i]).size()) == 2);
  vector<vector<int> > sols;
  for (int i = (1); i <= int(n); i++)
    if (!vis[i]) {
      sol.clear();
      dfs(i);
      assert(((int)(sol).size()) % 2 == 0 && ((int)(sol).size()) >= 4);
      sols.push_back(sol);
    }
  printf("%d\n", ((int)(sols).size()));
  for (auto &s : sols) {
    printf("%d", ((int)(s).size()));
    for (auto it = (s).begin(); it != (s).end(); it++) printf(" %d", *it);
    puts("");
  }
  return 0;
}