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>
int as[500];
int N;
std::vector<std::vector<int> > cycles;
bool visited[500];
struct Dinitz {
  int V;
  std::vector<int> head;
  std::vector<int> vertex;
  std::vector<int> conn;
  std::vector<int> res;
  std::vector<int> prev;
  std::vector<int> level;
  std::vector<int> curr;
  std::vector<int> orig;
  Dinitz(int V) : V(V), head(V, -1), level(V) {}
  void half_edge(int a, int b, int cap) {
    prev.push_back(head[a]);
    head[a] = conn.size();
    vertex.push_back(a);
    conn.push_back(b);
    res.push_back(cap);
    orig.push_back(cap);
  }
  void add_edge(int a, int b, int cap) {
    half_edge(a, b, cap);
    half_edge(b, a, 0);
  }
  bool bfs() {
    std::fill(level.begin(), level.end(), V);
    std::queue<std::pair<int, int> > frontier;
    frontier.emplace(N, 0);
    while (!frontier.empty()) {
      int node = frontier.front().first;
      int dist = frontier.front().second;
      frontier.pop();
      if (level[node] <= dist) {
        continue;
      }
      level[node] = dist;
      for (int e = head[node]; e >= 0; e = prev[e]) {
        if (res[e] > 0) {
          frontier.emplace(conn[e], dist + 1);
        }
      }
    }
    return level[(N + 1)] < V;
  }
  int dfs(int node, int flow) {
    if (node == (N + 1)) {
      return flow;
    }
    for (; curr[node] >= 0; curr[node] = prev[curr[node]]) {
      int e = curr[node];
      if ((level[conn[e]] == level[node] + 1) && (res[e] > 0)) {
        int min = dfs(conn[e], std::min(flow, res[e]));
        if (min > 0) {
          res[e] -= min;
          res[e ^ 1] += min;
          return min;
        }
      }
    }
    return 0;
  }
  int maxflow() {
    int total = 0;
    while (bfs()) {
      curr = head;
      for (int aug; (aug = dfs(N, 1e9)) != 0; total += aug)
        ;
    }
    return total;
  }
  void findcycles(int node) {
    if (visited[node]) {
      return;
    }
    visited[node] = true;
    cycles.back().push_back(node);
    for (int e = head[node]; e >= 0; e = prev[e]) {
      if ((res[e] != orig[e]) && (conn[e] < N)) {
        findcycles(conn[e]);
      }
    }
  }
};
bool isprime[20001];
int main() {
  std::fill(isprime + 2, isprime + 20001, true);
  for (int i = 2; i <= 20000; i++) {
    if (isprime[i]) {
      for (int k = i * 2; k <= 20000; k += i) {
        isprime[k] = false;
      }
    }
  }
  std::cin >> N;
  struct Dinitz dinitz(N + 2);
  for (int i = 0; i < N; i++) {
    std::cin >> as[i];
  }
  for (int i = 0; i < N; i++) {
    if (as[i] % 2 == 0) {
      dinitz.add_edge(N, (i), 2);
    } else {
      dinitz.add_edge((i), (N + 1), 2);
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      if (isprime[as[i] + as[j]]) {
        int even = (as[i] % 2 == 0) ? i : j;
        int odd = (as[i] % 2 == 1) ? i : j;
        dinitz.add_edge((even), (odd), 1);
      }
    }
  }
  int maxflow = dinitz.maxflow();
  if (maxflow < N) {
    std::cout << "Impossible" << std::endl;
    return 0;
  }
  cycles.emplace_back();
  assert(cycles.size() == 1);
  assert(cycles.back().empty());
  for (int node = 0; node < N; node++) {
    dinitz.findcycles(node);
    if (cycles.back().size() > 0) {
      cycles.emplace_back();
    }
  }
  assert(cycles.back().empty());
  cycles.pop_back();
  std::cout << cycles.size() << std::endl;
  for (const std::vector<int>& cycle : cycles) {
    std::cout << cycle.size();
    for (int fox : cycle) {
      std::cout << " " << fox + 1;
    }
    std::cout << std::endl;
  }
  return 0;
}