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 S, D, flux, N, M, nrE, rez, d[5050], p[5050];
int c[50500], v[50500], f[50500];
pair<int, int> mc[50500];
int q[5050 * 5050], first, last, viz[5050], inq[5050];
vector<int> m[5050];
inline void add(int x) {
  if (inq[x]) return;
  inq[x] = viz[x] = 1;
  q[last++] = x;
}
inline int pop() {
  int x = q[first++];
  return x;
}
inline void reset_stuff(int S) {
  first = last = 0;
  for (int i = 1; i <= N; ++i) {
    viz[i] = inq[i] = 0;
    d[i] = 1000000000;
  }
  d[S] = 0;
}
inline void addEdge(int x, int y, int cap, int cost) {
  mc[++nrE] = make_pair(x, y);
  c[nrE] = cap;
  v[nrE] = cost;
  f[nrE] = 0;
  m[x].push_back(nrE);
  mc[++nrE] = make_pair(y, x);
  c[nrE] = 0;
  f[nrE] = 0;
  v[nrE] = -cost;
  m[y].push_back(nrE);
}
inline int getO(int x) {
  if (x & 1) return x + 1;
  return x - 1;
}
inline int bfs(int S, int D) {
  reset_stuff(S);
  add(S);
  while (first < last) {
    int x = pop();
    if (x == D) continue;
    for (auto y : m[x]) {
      int ve = mc[y].second;
      if (f[y] < c[y] && d[ve] > d[x] + v[y]) {
        add(ve);
        p[ve] = y;
        d[ve] = d[x] + v[y];
      }
    }
  }
  return viz[D];
}
pair<int, int> update(int S, int D) {
  int ret = 0, retc = 0;
  int flux = 1000000000, curr = D;
  while (curr != S) {
    int muc = p[curr];
    int par = mc[p[curr]].first;
    if (c[muc] - f[muc] < flux) {
      flux = c[muc] - f[muc];
    }
    if (!flux) break;
    curr = par;
  }
  curr = D;
  while (curr != S) {
    int muc = p[curr];
    int par = mc[p[curr]].first;
    f[muc] += flux;
    f[getO(muc)] -= flux;
    curr = par;
  }
  ret += flux;
  retc += flux * d[D];
  return make_pair(ret, retc);
}
pair<int, int> flow(int S, int D) {
  nrE = 0;
  int ret = 0, retc = 0;
  while (true) {
    if (!bfs(S, D)) {
      break;
    }
    pair<int, int> u = update(S, D);
    ret += u.first, retc += u.second;
  }
  return make_pair(ret, retc);
}
int NRNOD = 0;
int isprime(int x) {
  if (x == 1) return 0;
  if (x == 2) return 1;
  for (int i = 2; i * i <= x; ++i) {
    if (x % i == 0) return 0;
  }
  return 1;
}
vector<int> vx;
vector<vector<int> > retv;
int vz[2020];
int val[2020];
void dfs(int x) {
  vx.push_back(x);
  vz[x] = 1;
  for (auto ax : m[x]) {
    auto n = mc[ax];
    if (n.second != 1 && n.second != N) {
      if (vz[n.second] == 0 && abs(f[ax]) == 1) {
        dfs(n.second);
      }
    }
  }
}
int nd[2020];
int main() {
  cin >> N;
  if (N % 2) {
    cout << "Impossible\n";
    return 0;
  }
  int S = ++NRNOD;
  for (int i = 1; i <= N; ++i) {
    cin >> val[i];
    nd[i] = ++NRNOD;
  }
  int D = ++NRNOD;
  for (int i = 1; i <= N; ++i) {
    if (val[i] % 2) {
      addEdge(S, nd[i], 2, 0);
      for (int j = 1; j <= N; ++j) {
        if (isprime(val[i] + val[j])) {
          addEdge(nd[i], nd[j], 1, 0);
        }
      }
    } else {
      addEdge(nd[i], D, 2, 0);
    }
  }
  N = NRNOD;
  int ret = flow(S, D).first;
  if (ret != (N - 2)) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 2; i <= N - 1; ++i) {
    if (!vz[i]) {
      vx.clear();
      dfs(i);
      retv.push_back(vx);
    }
  }
  cout << retv.size() << "\n";
  for (auto v : retv) {
    cout << v.size() << " ";
    for (auto x : v) {
      cout << x - 1 << " ";
    }
    cout << "\n";
  }
}