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 long long pr = 1000000009;
using namespace std;
int ev[201] = {0};
class FlowGraph {
  vector<int> Edgelist[300];
  long long flow;
  int s, t;
  vector<int> colr[300];
  int V, E, h[300], cap[300][300], fl[300][300], cf[300][300], e[300];
  void push(int u, int v) {
    int temp = min(e[u], cf[u][v]);
    if (v == t) flow += temp;
    fl[u][v] = fl[u][v] + temp;
    fl[v][u] = -fl[u][v];
    e[u] = e[u] - temp;
    e[v] = e[v] + temp;
    cf[u][v] = cap[u][v] - fl[u][v];
    cf[v][u] = cap[v][u] - fl[v][u];
  }
  void relabel(int u) {
    int temp = -1;
    for (int i = 0; i < Edgelist[u].size(); i++) {
      int v = Edgelist[u][i];
      if (cf[u][v] > 0) {
        if (temp == -1 || temp > h[v]) temp = h[v];
      }
    }
    h[u] = temp + 1;
  }

 public:
  FlowGraph(int V1, int s1, int t1) {
    V = V1;
    s = s1;
    t = t1;
    flow = 0;
    memset(cap, 0, sizeof(cap));
    memset(e, 0, sizeof(e));
    memset(fl, 0, sizeof(fl));
    memset(cf, 0, sizeof(cf));
  }
  int cntr;
  void Dfs();
  void DFSV(int vertx, vector<int> &visited, int clr);
  void initialize_preflow();
  int max_flow();
  void add_edge(int u, int v, int cap_uv, int cap_vu) {
    Edgelist[u].push_back(v);
    Edgelist[v].push_back(u);
    cap[u][v] = cap_uv;
    cap[v][u] = cap_vu;
    cf[v][u] = cap_vu;
    cf[u][v] = cap_uv;
  }
};
void FlowGraph::Dfs() {
  vector<int> visited(V, 0);
  visited[s] = visited[t] = 1;
  int clr = 0;
  for (int i = 0; i < V; i++) {
    if (!visited[i]) DFSV(i, visited, clr++);
  }
  cout << clr << endl;
  for (int i = 0; i < clr; i++) {
    cout << colr[i].size() << ' ';
    for (int j = 0; j < colr[i].size(); j++) {
      cout << colr[i][j] + 1 << ' ';
    }
    cout << endl;
  }
}
void FlowGraph::DFSV(int vertx, vector<int> &visited, int clr) {
  if (vertx == s || vertx == t) return;
  visited[vertx] = 1;
  colr[clr].push_back(vertx);
  for (int i = 0; i < Edgelist[vertx].size(); i++) {
    int nxt = Edgelist[vertx][i];
    if ((fl[vertx][nxt] || fl[nxt][vertx])) {
      if (!visited[nxt]) DFSV(nxt, visited, clr);
    }
  }
}
void FlowGraph::initialize_preflow() {
  memset(h, 0, sizeof(h));
  h[s] = V;
  for (int i = V - 1; i >= 0; i--) {
    memset(fl[i], 0, sizeof(fl[i]));
  }
  for (int i = 0; i < Edgelist[s].size(); i++) {
    int v = Edgelist[s][i];
    fl[s][v] = cap[s][v];
    fl[v][s] = -1 * cap[s][v];
    e[v] += fl[s][v];
    e[s] -= fl[s][v];
    cf[s][v] = 0;
    cf[v][s] = cap[v][s] - fl[v][s];
  }
}
int FlowGraph::max_flow() {
  initialize_preflow();
  queue<int> Q;
  int u, v, m;
  vector<bool> bits(V + 1, 0);
  for (int i = 0; i < Edgelist[s].size(); i++) {
    if (Edgelist[s][i] != t) {
      Q.push(Edgelist[s][i]);
      bits[Edgelist[s][i]] = 1;
    } else
      flow += cap[s][t];
  }
  int cnt = 0;
  while (!Q.empty()) {
    cnt++;
    int u = Q.front();
    m = -1;
    for (int i = 0; i < Edgelist[u].size() && e[u] > 0; i++) {
      v = Edgelist[u][i];
      if (cf[u][v] > 0) {
        if (h[u] > h[v]) {
          push(u, v);
          if (bits[v] == 0 && v != s && v != t) {
            bits[v] = 1;
            Q.push(v);
          }
        } else {
          if (m == -1)
            m = h[v];
          else
            m = min(h[v], m);
        }
      }
    }
    if (e[u] != 0)
      h[u] = 1 + m;
    else {
      bits[u] = 0;
      Q.pop();
    }
  }
  return flow;
}
int dp[100009];
inline bool ispr(int a) {
  if (dp[a] != -1) return dp[a];
  bool fl = true;
  int up = min((int)sqrt(a) + 1, a - 1);
  for (int i = 2; i <= up; i++) {
    if (a % i == 0) {
      fl = false;
      break;
    }
  }
  dp[a] = fl;
  return fl;
}
int main() {
  memset(dp, -1, sizeof(dp));
  dp[0] = 0;
  dp[1] = 0;
  dp[2] = 1;
  ios::sync_with_stdio(false);
  int n, u, v, c, A[201];
  vector<int> even(0), odd(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] % 2)
      odd.push_back(i);
    else {
      even.push_back(i);
      ev[i] = 1;
    }
  }
  if (even.size() != odd.size()) {
    cout << "Impossible" << endl;
    return 0;
  }
  FlowGraph G(n + 2, n, n + 1);
  for (int i = 0; i < n / 2; i++) {
    G.add_edge(n, even[i], 2, 0);
    G.add_edge(odd[i], n + 1, 2, 0);
  }
  for (int i = 0; i < n / 2; ++i) {
    for (int j = 0; j < n / 2; j++) {
      if (ispr(A[even[i]] + A[odd[j]])) {
        G.add_edge(even[i], odd[j], 1, 0);
      }
    }
  }
  if (G.max_flow() != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  G.Dfs();
  return 0;
}