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 n;
struct EdmondsKarp {
  struct Edge {
    int dest;
    long long int cap;
    long long int flow;
    int back;
  };
  EdmondsKarp(int n) : G(n) {}
  void addEdge(int src, int dest, long long int cap) {
    if (src == dest) return;
    Edge e1 = {dest, cap, 0, (int)G[dest].size()};
    Edge e2 = {src, 0, 0, (int)G[src].size()};
    G[src].push_back(e1);
    G[dest].push_back(e2);
  }
  long long int maxFlow(int s, int t) {
    long long int ret = 0;
    vector<pair<int, int>> parent;
    while (true) {
      parent.clear();
      parent.resize(G.size(), pair<int, int>(-1, -1));
      queue<int> Q;
      Q.push(s);
      parent[s] = pair<int, int>(s, -1);
      while (!Q.empty()) {
        int v = Q.front();
        Q.pop();
        if (v == t) break;
        for (int i = 0; i < G[v].size(); ++i) {
          if (G[v][i].flow == G[v][i].cap) continue;
          int x = G[v][i].dest;
          if (parent[x].first != -1) continue;
          parent[x] = pair<int, int>(v, i);
          Q.push(x);
        }
      }
      if (parent[t].first == -1) break;
      long long int a = -1;
      int v = t;
      while (v != s) {
        pair<int, int> p = parent[v];
        long long int rem =
            G[p.first][p.second].cap - G[p.first][p.second].flow;
        if (a < 0 || rem < a) a = rem;
        v = p.first;
      }
      ret += a;
      v = t;
      while (v != s) {
        pair<int, int> p = parent[v];
        G[p.first][p.second].flow += a;
        G[v][G[p.first][p.second].back].flow -= a;
        v = p.first;
      }
    }
    return ret;
  }
  vector<vector<Edge>> G;
};
bool nonprime[30000];
int f[250];
vector<int> G2[250];
bool fund[250];
int main() {
  nonprime[0] = true;
  nonprime[1] = true;
  for (int i = 2; i < 30000; ++i) {
    for (int x = 2 * i; x < 30000; x += i) {
      nonprime[x] = true;
    }
  }
  cin.sync_with_stdio(false);
  cin >> n;
  EdmondsKarp ek(n + 2);
  for (int i = 0; i < n; ++i) {
    cin >> f[i];
    if (f[i] & 1) {
      ek.addEdge(n, i, 2);
    } else {
      ek.addEdge(i, n + 1, 2);
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (!(f[i] & 1)) continue;
      if (!nonprime[f[i] + f[j]]) {
        ek.addEdge(i, j, 1);
      }
    }
  }
  int flow = ek.maxFlow(n, n + 1);
  if (flow != n) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    if (!(f[i] & 1)) continue;
    for (EdmondsKarp::Edge e : ek.G[i]) {
      if (e.cap <= 0 || e.flow != 1) continue;
      G2[i].push_back(e.dest);
      G2[e.dest].push_back(i);
    }
  }
  vector<vector<int>> cycs;
  for (int i = 0; i < n; ++i) {
    if (fund[i]) continue;
    int x = i;
    vector<int> cyc;
    cyc.push_back(x);
    int p = x;
    fund[p] = true;
    x = G2[p][0];
    while (!fund[x]) {
      cyc.push_back(x);
      if (G2[x][0] == p) {
        p = x;
        x = G2[x][1];
      } else {
        p = x;
        x = G2[x][0];
      }
      fund[p] = true;
    }
    cycs.push_back(cyc);
  }
  cout << cycs.size() << '\n';
  for (auto cyc : cycs) {
    cout << cyc.size();
    for (int s : cyc) {
      cout << ' ' << s + 1;
    }
    cout << '\n';
  }
  return 0;
}