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;
void io() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(15);
}
vector<pair<int, int> > odd, even;
const int MAXN = 2e4 + 10;
bool v[MAXN];
int len, sp[MAXN];
void Sieve() {
  for (int i = 2; i < MAXN; i += 2) sp[i] = 2;
  for (long long i = 3; i < MAXN; i += 2) {
    if (!v[i]) {
      sp[i] = i;
      for (long long j = i; (j * i) < MAXN; j += 2) {
        if (!v[j * i]) v[j * i] = true, sp[j * i] = i;
      }
    }
  }
}
const int MAX = 255;
class Dinic {
 public:
  struct edge {
    int a, b, cap, flow;
  };
  int n, source, sink;
  int dis[MAX];
  int ptr[MAX];
  vector<edge> e;
  vector<int> adj[MAX];
  Dinic(int a, int b, int c) {
    n = a;
    source = b;
    sink = c;
  }
  void set_dis() {
    for (int i = 0; i <= n; ++i) {
      dis[i] = -1;
    }
  }
  void set_ptr() {
    for (int i = 0; i <= n; ++i) {
      ptr[i] = 0;
    }
  }
  void reset(int a, int b, int c) {
    n = a;
    source = b;
    sink = c;
    e.clear();
    for (int i = 0; i <= n; i++) {
      dis[i] = 0;
      adj[i].clear();
      ptr[i] = 0;
    }
  }
  void add_edge(int a, int b, int cap) {
    edge e1 = {a, b, cap, 0};
    edge e2 = {b, a, 0, 0};
    adj[a].push_back((int)e.size());
    e.push_back(e1);
    adj[b].push_back((int)e.size());
    e.push_back(e2);
  }
  bool bfs() {
    queue<int> q;
    q.push(source);
    set_dis();
    dis[source] = 0;
    while (!q.empty() && dis[sink] == -1) {
      int v = q.front();
      q.pop();
      for (size_t i = 0; i < adj[v].size(); ++i) {
        int id = adj[v][i];
        int to = e[id].b;
        if (dis[to] == -1 && e[id].flow < e[id].cap) {
          dis[to] = dis[v] + 1;
          q.push(to);
        }
      }
    }
    while (!q.empty()) {
      q.pop();
    }
    return dis[sink] != -1;
  }
  int dfs(int v, int flow) {
    if (!flow) {
      return 0;
    }
    if (v == sink) {
      return flow;
    }
    for (; ptr[v] < (int)adj[v].size(); ++ptr[v]) {
      int id = adj[v][ptr[v]];
      int to = e[id].b;
      if (dis[to] != dis[v] + 1) {
        continue;
      }
      int pushed = dfs(to, min(flow, e[id].cap - e[id].flow));
      if (pushed) {
        e[id].flow += pushed;
        e[id ^ 1].flow -= pushed;
        return pushed;
      }
    }
    return 0;
  }
  int max_flow() {
    int flow = 0;
    while (bfs()) {
      set_ptr();
      int pushed;
      while (pushed = dfs(source, INT_MAX)) {
        flow += pushed;
      }
    }
    return flow;
  }
  void print_graph() {
    for (size_t i = 0; i < (int)e.size(); ++i) {
      printf("from: %d to : %d flow : %d cap : %d\n", e[i].a, e[i].b, e[i].flow,
             e[i].cap);
    }
  }
};
int vis[300];
Dinic maxflw(0, 0, 0);
int A[255];
vector<int> seq[260];
vector<int> G[330];
int comps, src, snk;
void dfs(int u) {
  vis[u] = 1;
  seq[comps - 1].push_back(u);
  for (int i = 0; i < G[u].size(); i++) {
    int to = G[u][i];
    if (to == src || to == snk) continue;
    if (!vis[to]) {
      dfs(to);
    }
  }
}
int main(int argc, char* argv[]) {
  io();
  Sieve();
  int a;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    A[i + 1] = a;
    if (a & 1) {
      odd.push_back({a, i + 1});
    } else {
      even.push_back({a, i + 1});
    }
  }
  src = n + 1;
  snk = n + 2;
  maxflw.reset(n + 2, src, snk);
  for (auto it1 : odd) {
    for (auto it2 : even) {
      if (sp[it1.first + it2.first] == (it1.first + it2.first)) {
        maxflw.add_edge(it1.second, it2.second, 1);
      }
    }
  }
  for (auto it : odd) {
    maxflw.add_edge(src, it.second, 2);
  }
  for (auto it : even) {
    maxflw.add_edge(it.second, snk, 2);
  }
  int maxf = maxflw.max_flow();
  if (maxf != 2 * odd.size() || maxf != 2 * even.size()) {
    cout << "Impossible\n";
    return 0;
  }
  comps = 0;
  for (auto it : odd) {
    int u = it.second;
    for (int i = 0; i < maxflw.adj[u].size(); i++) {
      int id = maxflw.adj[u][i];
      int to = maxflw.e[id].b;
      if (maxflw.e[id].flow == 1) {
        G[u].push_back(to);
        G[to].push_back(u);
      }
    }
  }
  for (auto it : odd) {
    if (!vis[it.second]) {
      comps++;
      dfs(it.second);
    }
  }
  cout << comps << '\n';
  for (int i = 0; i < comps; i++) {
    cout << seq[i].size() << " ";
    for (auto v : seq[i]) {
      cout << v << " ";
    }
    cout << '\n';
  }
  return 0;
}