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 MAXN = 510;
const int MAXM = 880010;
struct Node {
  int from, to, next;
  int cap;
} edge[MAXM];
int tol;
int head[MAXN];
int dep[MAXN];
int gap[MAXN];
int n;
void init() {
  tol = 0;
  memset(head, -1, sizeof(head));
}
void addedge(int u, int v, int w) {
  edge[tol].from = u;
  edge[tol].to = v;
  edge[tol].cap = w;
  edge[tol].next = head[u];
  head[u] = tol++;
  edge[tol].from = v;
  edge[tol].to = u;
  edge[tol].cap = 0;
  edge[tol].next = head[v];
  head[v] = tol++;
}
void BFS(int start, int end) {
  memset(dep, -1, sizeof(dep));
  memset(gap, 0, sizeof(gap));
  gap[0] = 1;
  int que[MAXN];
  int front, rear;
  front = rear = 0;
  dep[end] = 0;
  que[rear++] = end;
  while (front != rear) {
    int u = que[front++];
    if (front == MAXN) front = 0;
    for (int i = head[u]; i != -1; i = edge[i].next) {
      int v = edge[i].to;
      if (dep[v] != -1) continue;
      que[rear++] = v;
      if (rear == MAXN) rear = 0;
      dep[v] = dep[u] + 1;
      ++gap[dep[v]];
    }
  }
}
int SAP(int start, int end) {
  int res = 0;
  BFS(start, end);
  int cur[MAXN];
  int S[MAXN];
  int top = 0;
  memcpy(cur, head, sizeof(head));
  int u = start;
  int i;
  while (dep[start] < n) {
    if (u == end) {
      int temp = 0x3f3f3f3f;
      int inser;
      for (i = 0; i < top; i++)
        if (temp > edge[S[i]].cap) {
          temp = edge[S[i]].cap;
          inser = i;
        }
      for (i = 0; i < top; i++) {
        edge[S[i]].cap -= temp;
        edge[S[i] ^ 1].cap += temp;
      }
      res += temp;
      top = inser;
      u = edge[S[top]].from;
    }
    if (u != end && gap[dep[u] - 1] == 0) break;
    for (i = cur[u]; i != -1; i = edge[i].next)
      if (edge[i].cap != 0 && dep[u] == dep[edge[i].to] + 1) break;
    if (i != -1) {
      cur[u] = i;
      S[top++] = i;
      u = edge[i].to;
    } else {
      int min = n;
      for (i = head[u]; i != -1; i = edge[i].next) {
        if (edge[i].cap == 0) continue;
        if (min > dep[edge[i].to]) {
          min = dep[edge[i].to];
          cur[u] = i;
        }
      }
      --gap[dep[u]];
      dep[u] = min + 1;
      ++gap[dep[u]];
      if (u != start) u = edge[S[--top]].from;
    }
  }
  return res;
}
inline bool IsPr(int x) {
  for (int i = 2; i * i <= x; ++i) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int a[205];
vector<int> G[205];
bool vis[205];
vector<vector<int> > ans;
vector<int> cur;
void dfs(int u, int pre) {
  cur.push_back(u);
  vis[u] = 1;
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i];
    if (v == pre || vis[v]) continue;
    dfs(v, u);
  }
}
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) scanf("%d", a + i);
  int S = 0, T = N + 1;
  n = T + 3;
  init();
  for (int i = 1; i <= N; ++i) {
    if (a[i] & 1) {
      addedge(S, i, 2);
    } else {
      addedge(i, T, 2);
    }
    if (!(a[i] & 1)) continue;
    for (int j = 1; j <= N; ++j) {
      if (a[j] & 1) continue;
      if (IsPr(a[j] + a[i])) {
        addedge(i, j, 1);
      }
    }
  }
  int flow = SAP(S, T);
  if (flow != N) return puts("Impossible");
  for (int i = 1; i <= N; ++i) {
    if (!(a[i] & 1)) continue;
    for (int e = head[i]; ~e; e = edge[e].next) {
      if (edge[e].cap) continue;
      int v = edge[e].to;
      if (1 <= v && v <= N) G[i].push_back(v), G[v].push_back(i);
    }
  }
  for (int i = 1; i <= N; ++i) {
    if (vis[i]) continue;
    cur.clear();
    dfs(i, -1);
    ans.push_back(cur);
  }
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < (int)ans.size(); ++i) {
    printf("%d", (int)ans[i].size());
    for (int j = 0; j < (int)ans[i].size(); ++j) {
      printf(" %d", ans[i][j]);
    }
    puts("");
  }
  return 0;
}