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;
const int block_size = 320;
const long long mod = 1e9 + 7;
const long double eps = 1e-9;
const int inf = mod;
const double PI = atan(1) * 4;
template <typename T>
inline int sign(const T &a) {
  if (a < 0) return -1;
  if (a > 0) return 1;
  return 0;
}
template <typename T>
inline void in(T &x) {
  x = 0;
  T f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
struct edge {
  int from, to, cap;
};
const int maxn = 300, source = 250, sink = 251;
vector<int> g[maxn];
int val[maxn], n;
edge e[100010];
bool isp(int x) {
  if (x <= 1) return false;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
void addEdge(int u, int v, int cap) {
  static int cnt = 0;
  int cur = cnt;
  e[cur] = {u, v, cap};
  g[u].push_back(cur);
  e[cur ^ 1] = {v, u, 0};
  g[v].push_back(cur ^ 1);
  cnt += 2;
}
void build() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> val[i];
  for (long long i = 0; i < n; i++) {
    if (val[i] % 2 == 0) {
      addEdge(source, i, 2);
    } else {
      addEdge(i, sink, 2);
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      if (val[i] % 2 == 0 && val[j] % 2 == 1) {
        if (isp(val[i] + val[j])) {
          addEdge(i, j, 1);
        }
      }
    }
  }
}
namespace maxFlow {
int lvl[maxn], cur[maxn];
bool bfs(int start = source) {
  memset(lvl, -1, sizeof(lvl));
  memset(cur, 0, sizeof(cur));
  lvl[start] = 0;
  queue<int> q;
  q.push(start);
  while (((int)q.size())) {
    int f = q.front();
    q.pop();
    for (auto curEdge : g[f]) {
      auto &E = e[curEdge];
      if (E.cap) {
        if (lvl[E.to] == -1) {
          lvl[E.to] = lvl[f] + 1;
          q.push(E.to);
        }
      }
    }
  }
  return lvl[sink] != -1;
}
int dfs(int curNode, int curCap) {
  if (!curCap || curNode == sink) return curCap;
  int ans = 0;
  for (int &i = cur[curNode]; i < ((int)g[curNode].size()); i++) {
    int curEdge = g[curNode][i];
    if (lvl[e[curEdge].to] > lvl[curNode]) {
      int delta = dfs(e[curEdge].to, min(e[curEdge].cap, curCap));
      ans += delta;
      curCap -= delta;
      e[curEdge].cap -= delta;
      e[curEdge ^ 1].cap += delta;
      if (!curCap) break;
    }
  }
  return ans;
}
void dinic() {
  while (bfs()) {
    (dfs(source, inf));
  }
}
}  // namespace maxFlow
vector<int> newGraph[maxn];
namespace finish {
bool vis[maxn];
void dfs(int cur, vector<int> &v) {
  v.push_back(cur);
  if (!vis[newGraph[cur][0]]) {
    vis[newGraph[cur][0]] = 1;
    dfs(newGraph[cur][0], v);
  } else if (!vis[newGraph[cur][1]]) {
    vis[newGraph[cur][1]] = 1;
    dfs(newGraph[cur][1], v);
  }
}
void finish() {
  for (long long i = 0; i < maxn; i++) {
    for (auto curEdge : g[i]) {
      if (e[curEdge].from == source || e[curEdge].to == sink) {
        if (e[curEdge].cap != 0) {
          cout << "Impossible" << endl;
          exit(0);
          ;
        }
      }
    }
  }
  for (long long i = 0; i < 100010; i++) {
    if (val[e[i].from] != 0 && val[e[i].to] != 0 && val[e[i].from] % 2 == 0 &&
        val[e[i].to] % 2 == 1 && e[i].cap == 0) {
      newGraph[e[i].from].push_back(e[i].to);
      newGraph[e[i].to].push_back(e[i].from);
    }
  }
  vector<vector<int>> ans;
  for (long long i = 0; i < n; i++) {
    if (!vis[i]) {
      assert(((int)newGraph[i].size()) == 2);
      vis[i] = 1;
      vector<int> temp;
      dfs(i, temp);
      ans.push_back(temp);
    }
  }
  cout << ((int)ans.size()) << endl;
  for (auto &v : ans) {
    cout << ((int)v.size()) << ' ';
    for (auto ele : v) {
      cout << 1 + ele << ' ';
    }
    cout << endl;
  }
}
}  // namespace finish
int main() {
  build();
  maxFlow::dinic();
  finish::finish();
  return 0;
}