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;
template <typename T>
class MaxFlow {
 public:
  struct Node {
    int to, next, rev;
    T cap, flow;
  };
  vector<int> head;
  vector<Node> edge;
  int n;
  const int INF = (int)2e9;
  MaxFlow(int _n) : head(_n, -1), n(_n) {}
  void AddEdge(int u, int v, T cost) {
    int fe = PrivateAddEdge(u, v, cost);
    int be = PrivateAddEdge(v, u, 0);
    edge[fe].rev = be;
    edge[be].rev = fe;
  }
  T Run(int s, int t) {
    int i, u, v;
    T res = 0;
    while (true) {
      queue<T> q;
      vector<int> path(n, -1);
      vector<int> parent(n, -1);
      vector<T> mas(n, INF);
      parent[s] = -2;
      q.push(s);
      while (!q.empty()) {
        u = q.front();
        q.pop();
        bool reachEnd = false;
        for (i = head[u]; i != -1; i = edge[i].next) {
          v = edge[i].to;
          if (parent[v] == -1 && edge[i].cap > edge[i].flow) {
            parent[v] = u;
            path[v] = i;
            mas[v] = min(mas[u], edge[i].cap - edge[i].flow);
            if (v == t) {
              reachEnd = true;
              break;
            }
            q.push(v);
          }
        }
        if (reachEnd) break;
      }
      if (parent[t] < 0) break;
      T flow = mas[t];
      res += flow;
      v = t;
      while (v != s) {
        edge[path[v]].flow += flow;
        edge[edge[path[v]].rev].flow -= flow;
        v = parent[v];
      }
    }
    return res;
  }

 private:
  int PrivateAddEdge(int u, int v, T cap) {
    int i = edge.size();
    Node node;
    node.next = head[u];
    node.to = v;
    node.cap = cap;
    node.flow = 0;
    head[u] = i;
    edge.push_back(node);
    return i;
  }
};
int mas[210];
bool prime[20100];
int flow[210][210];
void init_prime() {
  memset(prime, true, sizeof(prime));
  prime[0] = prime[1] = false;
  for (int i = 2; i < 20100; i++) {
    if (prime[i]) {
      for (int j = i * i; j < 20100; j += i) prime[j] = false;
    }
  }
}
void Solve() {
  int i, j, k, n, m;
  init_prime();
  scanf("%d", &(n));
  if (n & 1) {
    printf("Impossible");
    return;
  }
  int odd = 0, even = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &(mas[i]));
    odd += mas[i] & 1;
    even += (mas[i] & 1) == 0;
  }
  if (odd != even) {
    printf("Impossible");
    return;
  }
  MaxFlow<int> mf(n + 2);
  for (i = 0; i < n; i++) {
    if (mas[i] & 1) {
      mf.AddEdge(i + 2, 1, 2);
      for (j = 0; j < n; j++) {
        if (prime[mas[i] + mas[j]]) {
          mf.AddEdge(j + 2, i + 2, 1);
        }
      }
    } else
      mf.AddEdge(0, i + 2, 2);
  }
  int maxflow = mf.Run(0, 1);
  if (maxflow != n) {
    printf("Impossible");
    return;
  }
  vector<bool> used(n, false);
  vector<vector<int> > res;
  for (i = 0; i < n; i++) {
    if (!used[i]) {
      vector<int> table;
      int u = i;
      while (1) {
        table.push_back(u + 1);
        used[u] = true;
        for (j = mf.head[u + 2]; j != -1; j = mf.edge[j].next) {
          if (mf.edge[j].flow && mf.edge[j].to > 1 &&
              !used[mf.edge[j].to - 2]) {
            u = mf.edge[j].to - 2;
            break;
          }
        }
        if (j == -1) break;
      }
      res.push_back(table);
    }
  }
  printf("%d\n", res.size());
  for (i = 0; i < res.size(); i++) {
    printf("%d", res[i].size());
    for (j = 0; j < res[i].size(); j++) printf(" %d", res[i][j]);
    printf("\n");
  }
}
int main() {
  Solve();
  return 0;
}