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 int INF = 999999;
int is_prime(int number) {
  for (int i = 2; i <= sqrt(number + 1); ++i) {
    if (number % i == 0) {
      return false;
    }
  }
  return true;
}
class Dinic {
 public:
  class Edge {
   public:
    int to;
    int cap, flow;
    Edge *back;
    Edge(int to, int cap, int flow, Edge *back)
        : to(to), cap(cap), flow(flow), back(back) {}
    bool remain() const { return flow < cap; }
    void add_flow(int f) {
      flow += f;
      back->flow -= f;
    }
  };
  std::vector<std::vector<Edge *> > g_;
  std::vector<int> memo_, level_;
  int src_, sink_;
  Dinic(int N, int src, int sink)
      : g_(N), memo_(N), level_(N), src_(src), sink_(sink) {}
  int dinic_augment(int v, int cap) {
    if (v == sink_) return cap;
    const int N = g_[v].size();
    for (int i = memo_[v]; i < N; ++i) {
      const auto &e = g_[v][i];
      if (level_[e->to] != level_[v] + 1) {
        continue;
      }
      if (!e->remain()) {
        continue;
      }
      const int f = dinic_augment(e->to, std::min(cap, e->cap - e->flow));
      if (f > 0) {
        e->add_flow(f);
        memo_[v] = i + 1;
        return f;
      }
    }
    return 0;
  }
  void add_edge(int from, int to, int cap) {
    Edge *e = new Edge(to, cap, 0, nullptr);
    Edge *r = new Edge(from, 0, 0, e);
    e->back = r;
    g_[from].push_back(e);
    g_[to].push_back(r);
  }
  int calc() {
    int flow = 0;
    while (true) {
      fill(begin(level_), end(level_), -1);
      std::queue<int> q;
      q.push(src_);
      level_[src_] = 0;
      while (!q.empty()) {
        const int v = q.front();
        q.pop();
        for (const auto &e : g_[v]) {
          if (e->remain() and level_[e->to] == -1) {
            level_[e->to] = level_[v] + 1;
            q.push(e->to);
          }
        }
      }
      bool updated = false;
      fill(begin(memo_), end(memo_), 0);
      while (true) {
        int add = dinic_augment(src_, INF);
        if (add == 0) {
          break;
        }
        flow += add;
        updated = true;
      }
      if (!updated) {
        break;
      }
    }
    return flow;
  }
};
int main() {
  int n;
  std::cin >> n;
  std::vector<int> nodes;
  for (int i = 0; i < n; ++i) {
    int tmp;
    std::cin >> tmp;
    nodes.push_back(tmp);
  }
  Dinic dinic(n + 2, n, n + 1);
  int flow = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < i; ++j) {
      if (is_prime(nodes[i] + nodes[j])) {
        if (nodes[i] % 2 == 0) {
          dinic.add_edge(i, j, 1);
        } else {
          dinic.add_edge(j, i, 1);
        }
      }
    }
    if (nodes[i] % 2 == 0) {
      dinic.add_edge(n, i, 2);
      flow += 2;
    } else {
      dinic.add_edge(i, n + 1, 2);
    }
  }
  if (flow != n or dinic.calc() != flow) {
    std::cout << "Impossible" << std::endl;
  } else {
    const auto &graph = dinic.g_;
    std::vector<bool> used(n, false);
    std::vector<std::vector<int> > components;
    for (int i = 0; i < n; ++i) {
      if (used[i]) {
        continue;
      }
      int cur = i;
      used[i] = true;
      components.push_back(std::vector<int>());
      while (true) {
        components.back().push_back(cur + 1);
        for (auto e : graph[cur]) {
          if (e->flow != 0 and e->to < n and !used[e->to]) {
            used[e->to] = true;
            cur = e->to;
            break;
          }
        }
        if (cur + 1 == components.back().back()) {
          break;
        }
      }
    }
    std::cout << components.size() << std::endl;
    for (const auto &c : components) {
      std::cout << c.size() << ' ';
      for (int i = 0; i < c.size(); ++i) {
        std::cout << c[i];
        if (i < c.size() - 1) {
          std::cout << ' ';
        }
      }
      std::cout << std::endl;
    }
  }
  return 0;
}