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>
const double EPS = 1e-24;
const long long int MOD = 1000000007ll;
const double PI = 3.14159265359;
int INF = 2147483645;
template <class T>
T Max2(T a, T b) {
  return a < b ? b : a;
}
template <class T>
T Min2(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T Max3(T a, T b, T c) {
  return Max2(Max2(a, b), c);
}
template <class T>
T Min3(T a, T b, T c) {
  return Min2(Min2(a, b), c);
}
template <class T>
T Max4(T a, T b, T c, T d) {
  return Max2(Max2(a, b), Max2(c, d));
}
template <class T>
T Min4(T a, T b, T c, T d) {
  return Min2(Min2(a, b), Max2(c, d));
}
using namespace std;
int N;
int a[210];
int isp[20010];
vector<vector<int> > ans;
vector<int> anst;
vector<int> G[210];
int next[210];
bool vis[210];
void dfs(int u, int p) {
  anst.push_back(u);
  vis[u] = true;
  int sz = G[u].size();
  for (auto v : G[u]) {
    if (!vis[v]) {
      dfs(v, p);
      break;
    }
  }
}
struct FordFulkerson {
  int N;
  vector<vector<int> > G;
  vector<bool> vis;
  vector<int> parent;
  int source, sink;
  void init(int _N, int _source, int _sink) {
    N = _N;
    vector<int> _v1(_N + 1, 0);
    vector<bool> _v2(_N + 1, false);
    for (int i = 0; i <= _N; i++) G.push_back(_v1);
    source = _source;
    sink = _sink;
    vis = _v2;
    parent = _v1;
  }
  void addEgde(int _u, int _v, int _w) { G[_u][_v] = _w; }
  bool bfs() {
    for (int i = 1; i <= N; i++) vis[i] = false;
    queue<int> Q;
    Q.push(source);
    vis[source] = true;
    parent[source] = -1;
    while (!Q.empty()) {
      int u = Q.front();
      Q.pop();
      if (u == sink) break;
      for (int i = 1; i <= N; i++) {
        if (!vis[i] && G[u][i] > 0) {
          vis[i] = true;
          parent[i] = u;
          Q.push(i);
        }
      }
    }
    return vis[sink];
  }
  int maxflow() {
    int flow = 0;
    while (bfs()) {
      int tempflow = INF + 1;
      int u;
      for (int v = sink; v != source; v = parent[v]) {
        u = parent[v];
        tempflow = Min2(tempflow, G[u][v]);
      }
      for (int v = sink; v != source; v = parent[v]) {
        u = parent[v];
        G[u][v] -= tempflow;
        G[v][u] += tempflow;
      }
      flow += tempflow;
    }
    return flow;
  }
};
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> a[i];
  for (int i = 2; i <= 20000; i++) isp[i] = true;
  for (int i = 2; i <= 20000; i++)
    if (isp[i])
      for (int j = i + i; j <= 20000; j += i) isp[j] = false;
  FordFulkerson Flow;
  Flow.init(N + 2, N + 1, N + 2);
  for (int i = 1; i <= N; i++) {
    if (a[i] % 2 == 1)
      Flow.addEgde(i, N + 2, 2);
    else {
      Flow.addEgde(N + 1, i, 2);
      for (int j = 1; j <= N; j++)
        if (isp[a[i] + a[j]]) Flow.addEgde(i, j, 1);
    }
  }
  if (Flow.maxflow() == N) {
    for (int i = 1; i <= N; i++)
      for (int j = 1; j <= N; j++)
        if (Flow.G[i][j] && a[i] % 2 == 1 && a[j] % 2 == 0)
          G[i].push_back(j), G[j].push_back(i);
    for (int i = 1; i <= N; i++)
      if (!vis[i]) {
        anst.clear();
        dfs(i, i);
        ans.push_back(anst);
      }
    cout << ans.size() << "\n";
    for (vector<int> i : ans) {
      cout << i.size() << " ";
      for (int j : i) cout << j << " ";
      cout << "\n";
    }
  } else {
    cout << "Impossible";
    return 0;
  }
  return 0;
}