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>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int M = 1e3 + 5, INF = 0x3f3f3f3f, mod = 1e9 + 7;
const int N = 2e4 + 5;
struct edge {
  int to, rev;
  long long cap;
  edge(int to, long long cap, int rev) : to(to), cap(cap), rev(rev) {}
};
vector<edge> G[M];
int level[M];
int iter[M];
void add_edge(int from, int to, int cap) {
  G[from].push_back(edge(to, cap, G[to].size()));
  G[to].push_back(edge(from, 0, G[from].size() - 1));
}
void bfs(int s) {
  memset(level, -1, sizeof(level));
  queue<int> Q;
  level[s] = 0;
  Q.push(s);
  while (!Q.empty()) {
    int v = Q.front();
    Q.pop();
    for (int j = 0; j < G[v].size(); j++) {
      edge &e = G[v][j];
      if (e.cap > 0 && level[e.to] < 0) {
        level[e.to] = level[v] + 1;
        Q.push(e.to);
      }
    }
  }
}
long long dfs(int v, int t, long long f) {
  if (v == t) return f;
  for (int &j = iter[v]; j < G[v].size(); j++) {
    edge &e = G[v][j];
    if (e.cap > 0 && level[v] < level[e.to]) {
      long long d = dfs(e.to, t, min(f, e.cap));
      if (d > 0) {
        e.cap -= d;
        G[e.to][e.rev].cap += d;
        return d;
      }
    }
  }
  return 0;
}
long long max_flow(int s, int t) {
  long long flow = 0;
  for (;;) {
    bfs(s);
    if (level[t] < 0) return flow;
    memset(iter, 0, sizeof(iter));
    long long f;
    while ((f = dfs(s, t, INF)) > 0) flow += f;
  }
}
bool mark[N];
int A[M];
void make_prime() {
  memset(mark, 0, sizeof(mark));
  for (int j = 2; j < N; j++) {
    for (int k = 2; k * j < N; k++) {
      mark[j * k] = 1;
    }
  }
}
vector<int> edge[M];
void dfs(int x, vector<int> &cnt) {
  if (mark[x]) return;
  mark[x] = 1;
  cnt.push_back(x);
  for (auto to : edge[x]) {
    dfs(to, cnt);
  }
}
int main() {
  make_prime();
  int n;
  scanf("%d", &n);
  int s = 0, t = n + 1;
  int sum = 0;
  for (int j = 1; j <= n; j++) {
    scanf("%d", &A[j]);
    if (A[j] & 1)
      add_edge(j, t, 2);
    else
      add_edge(s, j, 2), sum++;
  }
  for (int j = 1; j <= n; j++) {
    if (A[j] & 1) continue;
    for (int k = 1; k <= n; k++) {
      if (!(A[k] & 1)) continue;
      if (!mark[A[j] + A[k]]) {
        add_edge(j, k, 1);
      }
    }
  }
  int flow = max_flow(s, t);
  if (flow != sum * 2)
    printf("Impossible\n");
  else {
    memset(mark, 0, sizeof(mark));
    for (int j = 1; j <= n; j++) {
      if (A[j] & 1) continue;
      for (auto x : G[j]) {
        if (!x.cap) {
          edge[j].push_back(x.to);
          edge[x.to].push_back(j);
        }
      }
    }
    vector<vector<int> > ans;
    for (int j = 1; j <= n; j++) {
      if (mark[j]) continue;
      vector<int> cnt;
      dfs(j, cnt);
      ans.push_back(cnt);
    }
    printf("%d\n", ans.size());
    for (auto t : ans) {
      printf("%d", t.size());
      for (auto x : t) {
        printf(" %d", x);
      }
      printf("\n");
    }
  }
  return 0;
}
