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 MAXN = 200, MAXV = 2e4, INF = 0x3f3f3f3f;
int n, pn, oc, ec, S, T, ecnt = 1, a[MAXN + 5], pr[MAXV + 5];
int d[MAXN + 5], head[MAXN + 5], curh[MAXN + 5], ref[MAXN + 5];
bool vis[MAXV + 5], mtc[MAXN + 5];
std::vector<int> odd, even;
std::vector<std::vector<int> > table;
struct Edge {
  int to, flow, nxt;
} graph[MAXN * 2 + MAXN * MAXN / 2 + 5];
inline void link(const int s, const int t, const int f) {
  graph[++ecnt] = {t, f, head[s]};
  head[s] = ecnt;
}
inline void addEdge(const int s, const int t, const int f) {
  link(s, t, f), link(t, s, 0);
}
inline void sieve(const int n) {
  vis[1] = true;
  for (int i = 2; i <= n; ++i) {
    if (!vis[i]) pr[++pn] = i;
    for (int j = 1; j <= pn && i * pr[j] <= n; ++j) {
      vis[i * pr[j]] = true;
      if (!(i % pr[j])) break;
    }
  }
}
inline int DFS(const int u, int iflow) {
  if (u == T) return iflow;
  int oflow = 0;
  for (int &i = curh[u], v, of; i; i = graph[i].nxt) {
    if (d[v = graph[i].to] == d[u] + 1 && graph[i].flow) {
      of = DFS(v, std::min(iflow, graph[i].flow));
      oflow += of, graph[i].flow -= of, graph[i ^ 1].flow += of;
      if (!(iflow -= of)) break;
    }
  }
  if (!oflow) d[u] = -1;
  return oflow;
}
inline bool BFS() {
  static std::queue<int> que;
  for (int i = 1; i <= T; ++i) d[i] = -1;
  que.push(S), d[S] = 0;
  for (int u; !que.empty(); que.pop()) {
    u = que.front();
    for (int i = head[u], v; i; i = graph[i].nxt) {
      if (!~d[v = graph[i].to] && graph[i].flow) {
        que.push(v), d[v] = d[u] + 1;
      }
    }
  }
  return ~d[T];
}
inline int Dinic() {
  int ret = 0;
  for (; BFS(); ret += DFS(S, INF)) {
    for (int i = 1; i <= T; ++i) {
      curh[i] = head[i];
    }
  }
  return ret;
}
inline void match(const int u, std::vector<int>& now) {
  now.push_back(u), mtc[u] = true;
  for (int i = head[u], v; i; i = graph[i].nxt) {
    if (!mtc[v = graph[i].to] && v < S &&
        ((u <= oc && graph[i ^ 1].flow) || (u > oc && graph[i].flow))) {
      match(v, now);
      break;
    }
  }
}
int main() {
  scanf("%d", &n);
  int mx = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    if (mx < a[i]) mx = a[i];
    if (a[i] & 1)
      odd.push_back(a[i]);
    else
      even.push_back(a[i]);
  }
  sieve(mx << 1);
  oc = odd.size(), ec = even.size();
  S = oc + ec + 1, T = S + 1;
  for (int i = 1, ot = 0, ct = 0; i <= n; ++i) {
    if (a[i] & 1)
      ref[++ot] = i;
    else
      ref[oc + ++ct] = i;
  }
  for (int i = 1; i <= oc; ++i) addEdge(S, i, 2);
  for (int i = 1; i <= ec; ++i) addEdge(i + oc, T, 2);
  for (int i = 0; i ^ oc; ++i) {
    for (int j = 0; j ^ ec; ++j) {
      if (!vis[odd[i] + even[j]]) {
        addEdge(i + 1, oc + j + 1, 1);
      }
    }
  }
  int f = Dinic();
  if (f < n) return puts("Impossible"), 0;
  std::vector<int> now;
  for (int i = 1; i <= oc; ++i) {
    if (!mtc[i]) {
      now.clear();
      match(i, now);
      table.push_back(now);
    }
  }
  printf("%d\n", (int)table.size());
  for (auto ele : table) {
    printf("%d", (int)ele.size());
    for (int v : ele) printf(" %d", ref[v]);
    putchar('\n');
  }
  return 0;
}