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.
#include <bits/stdc++.h>
using namespace std;
bool pr(int x) {
  for (int i = 2; i * i <= x; ++i) {
    if (x % i == 0) return false;
  }
  return true;
}
struct edge {
  int from, to, cap, flow;
  edge(int a = 0, int b = 0, int c = 0, int d = 0) {
    from = a;
    to = b;
    cap = c;
    flow = d;
  }
};
int n, k, s, t, en;
const int inf = int(2e9);
edge E[1000000];
vector<vector<int> > g;
vector<int> d, ptr, a;
void add_edge(int from, int to, int cap) {
  E[en + en] = edge(from, to, cap, 0);
  E[en + en + 1] = edge(to, from, 0, 0);
  g[from].push_back(en + en);
  g[to].push_back(en + en + 1);
  ++en;
}
void fill() {
  n = k + 2;
  s = 0;
  t = n - 1;
  g.resize(n);
  en = 0;
  for (int i = 0; i < k; ++i) {
    if (a[i] % 2 == 0) {
      add_edge(s, i + 1, 2);
    } else {
      add_edge(i + 1, t, 2);
    }
  }
  for (int i = 0; i < k; ++i) {
    for (int j = 0; j < k; ++j) {
      if ((a[i] % 2 == 0) && (a[j] % 2 == 1)) {
        if (pr((a[i] + a[j]))) add_edge(i + 1, j + 1, 1);
      }
    }
  }
}
bool bfs() {
  d.assign(n, -1);
  d[s] = 0;
  queue<int> q;
  q.push(s);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int i = 0; i < g[v].size(); ++i) {
      int e = g[v][i];
      int to = E[e].to;
      if (d[to] == -1 && E[e].cap > E[e].flow) {
        d[to] = d[v] + 1;
        q.push(to);
      }
    }
  }
  return (d[t] != -1);
}
int dfs(int v, int flow) {
  if (flow == 0 || v == t) return flow;
  for (; ptr[v] < g[v].size(); ++ptr[v]) {
    int e = g[v][ptr[v]];
    int to = E[e].to;
    if (d[to] != d[v] + 1) continue;
    int ff = dfs(to, min(E[e].cap - E[e].flow, flow));
    if (ff > 0) {
      E[e].flow += ff;
      E[e ^ 1].flow -= ff;
      return ff;
    }
  }
  return 0;
}
int dinic() {
  int flow = 0;
  while (bfs()) {
    ptr.assign(n, 0);
    int ff = 1;
    while (ff) {
      ff = dfs(s, inf);
      flow += ff;
    }
  }
  return flow;
}
vector<int> us;
vector<vector<int> > res;
vector<set<int> > gg;
void df(int st, int v) {
  us[v] = 1;
  if (gg[v].size() == 0) return;
  res.back().push_back(v);
  set<int>::iterator it = gg[v].begin();
  int to = (*it);
  gg[v].erase(it);
  gg[to].erase(v);
  df(st, to);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> k;
  a.resize(k);
  for (int i = 0; i < k; ++i) cin >> a[i];
  int bal = 0;
  for (int i = 0; i < k; ++i) {
    if (a[i] % 2 == 0)
      ++bal;
    else
      --bal;
  }
  if (bal != 0) {
    cout << "Impossible";
    return 0;
  }
  fill();
  int flow = dinic();
  if (flow < k) {
    cout << "Impossible";
    return 0;
  }
  gg.resize(n);
  for (int i = 0; i < en; ++i) {
    int e = i + i;
    int fr = E[e].from;
    int to = E[e].to;
    if (fr != s && to != t) {
      if (E[e].flow == 1) {
        gg[fr].insert(to);
        gg[to].insert(fr);
      }
    }
  }
  us.resize(n, 0);
  for (int i = 0; i < n; ++i) {
    if (us[i] == 0 && i != s && i != t) {
      res.push_back(vector<int>(0));
      df(i, i);
    }
  }
  cout << res.size() << "\n";
  for (int i = 0; i < res.size(); ++i) {
    cout << res[i].size() << " ";
    for (int j = 0; j < res[i].size(); ++j) cout << res[i][j] << " ";
    cout << "\n";
  }
  return 0;
}
