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;
const int N = 205;
const int INF = 0x3f3f3f3f;
struct Node {
  int to;
  int cap;
  int rev;
  Node(){};
  Node(int t, int c, int r) { to = t, cap = c, rev = r; }
};
vector<Node> v[N];
vector<int> ans;
bool used[N];
int f[N];
int num[205], sum;
bool isprime[20005], vis[205];
void add_Node(int from, int to, int cap) {
  v[from].push_back(Node(to, cap, v[to].size()));
  v[to].push_back(Node(from, 0, v[from].size() - 1));
}
int dfs(int s, int t, int f) {
  if (s == t) return f;
  used[s] = true;
  for (int i = 0; i < v[s].size(); i++) {
    Node &tmp = v[s][i];
    if (used[tmp.to] == false && tmp.cap > 0) {
      int d = dfs(tmp.to, t, min(f, tmp.cap));
      if (d > 0) {
        tmp.cap -= d;
        v[tmp.to][tmp.rev].cap += d;
        return d;
      }
    }
  }
  return 0;
}
int max_flow(int s, int t) {
  int flow = 0;
  for (;;) {
    memset(used, false, sizeof(used));
    int f = dfs(s, t, INF);
    if (f == 0) return flow;
    flow += f;
  }
}
void init(int n, int MAX) {
  for (int i = 1; i <= n; i++) f[i] = i;
  for (int i = 2; i <= 2 * MAX; i++)
    if (!isprime[i])
      for (int j = i + i; j <= 2 * MAX; j += i) isprime[j] = 1;
}
int find(int x) {
  if (f[x] != x) f[x] = find(f[x]);
  return f[x];
}
void Union(int a, int b) {
  int f1 = find(a);
  int f2 = find(b);
  if (f1 != f2) f[f2] = f1, sum--;
}
void dfs(int u, int p, int z, bool f, bool pri) {
  Node t;
  int to;
  for (int i = 0; i < v[u].size(); i++) {
    if (f == 1)
      t = v[u][i], to = t.to;
    else
      t = v[v[u][i].to][v[u][i].rev], to = v[u][i].to;
    if (t.cap == 1 && to != p) {
      if (to == z) return;
      Union(u, to);
      vis[to] = 1;
      if (pri) ans.push_back(to);
      dfs(to, u, z, f ^ 1, pri);
      return;
    }
  }
}
int main() {
  int n, MAX = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num[i]);
    MAX = max(MAX, num[i]);
  }
  init(n, MAX);
  if (n % 2 || n <= 2) {
    printf("Impossible\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (num[i] % 2) {
      add_Node(0, i, 2);
      for (int j = 1; j <= n; j++)
        if (num[j] % 2 == 0 && !isprime[num[i] + num[j]]) add_Node(i, j, 1);
    } else
      add_Node(i, n + 1, 2);
  }
  if (max_flow(0, n + 1) == n) {
    sum = n;
    Node t;
    for (int i = 0; i < v[n + 1].size(); i++) {
      t = v[n + 1][i];
      if (!vis[t.to]) {
        vis[t.to] = 1;
        dfs(t.to, -1, t.to, 1, 0);
      }
    }
    printf("%d\n", sum);
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < v[n + 1].size(); i++) {
      t = v[n + 1][i];
      if (!vis[t.to]) {
        ans.clear();
        ans.push_back(t.to);
        vis[t.to] = 1;
        dfs(t.to, -1, t.to, 1, 1);
        printf("%d", ans.size());
        for (int i = 0; i < ans.size(); i++) printf(" %d", ans[i]);
        printf("\n");
      }
    }
  } else
    printf("Impossible\n");
  return 0;
}
