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>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int inf = 1000000007;
const long long linf = 1000000000000000000LL;
const unsigned long long ulinf = (1ULL << 63) - 10ULL;
const double eps = 0.000001;
const double pi = 3.14159265358979323846;
template <class T>
T abs(T a) {
  return a >= 0 ? a : -a;
}
template <class T>
int sign(T a) {
  return a > eps ? 1 : a < -eps ? -1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T mod(T a, T b) {
  T ret = a % b;
  if (ret < 0) ret += b;
  return ret;
}
template <class T>
T lowbit(T x) {
  return x & -x;
}
long long addmod(long long a, long long b, long long c) {
  return ((a + b) % c + c) % c;
}
long long mulmod(long long a, long long b, long long c) {
  if (b == 0LL) return 0LL;
  long long ret = mulmod(a, b >> 1, c);
  ret = (ret + ret) % c;
  if (b & 1LL) ret = (ret + a) % c;
  return ret;
}
long long powmod(long long a, long long b, long long c) {
  if (b == 0LL) return 1LL;
  long long ret = powmod(a, b >> 1, c);
  ret = ret * ret % c;
  if (b & 1LL) ret = ret * a % c;
  return ret;
}
long long modinv(long long a, long long b) { return powmod(a, b - 2LL, b); }
template <class T>
void maxe(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void mine(T &a, T b) {
  if (a > b) a = b;
}
int iszero(double a) { return a <= eps && a >= -eps; }
template <class T>
void geti(T &a) {
  a = 0;
  int b = 0;
  char c;
  while ((c = getchar()) == ' ' || c == '\n')
    ;
  if (c == '-')
    b = 1;
  else
    a = c - 48;
  while ((c = getchar()) != ' ' && c != '\n') a = a * 10 + c - 48;
  if (b) a = -a;
}
void fileio_in_out() {
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
}
void fileio_txt() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
const int N = 222;
const int M = 22222;
const int K = 20;
const long long md = inf;
int test;
int n, m, k, ans;
int a[N];
int p[M];
vector<int> v[N];
int vis[N];
vector<int> aa[N];
class Dinic {
 public:
  int d[N];
  int head[N], nxt[M], cur[N];
  struct Edge {
    int from, to, cap, flow;
    Edge(int from, int to, int cap, int flow)
        : from(from), to(to), cap(cap), flow(flow) {}
    Edge() {}
  } e[M];
  int s, t, cnt;
  int node;
  bool bfs() {
    for (int i = 0; i < node; i++) d[i] = -1;
    d[s] = 0;
    queue<int> q;
    q.push(s);
    while (!q.empty()) {
      int x = q.front();
      q.pop();
      for (int i = head[x]; ~i; i = nxt[i]) {
        Edge &ed = e[i];
        if (d[ed.to] == -1 && ed.cap > ed.flow) {
          d[ed.to] = d[x] + 1;
          q.push(ed.to);
        }
      }
    }
    return d[t] != -1;
  }
  int dfs(int x, int a) {
    if (x == t || a == 0) return a;
    int flow = 0, f;
    for (; ~cur[x]; cur[x] = nxt[cur[x]]) {
      Edge &ed = e[cur[x]];
      if (d[ed.to] == d[x] + 1 &&
          (f = dfs(ed.to, min(ed.cap - ed.flow, a))) > 0) {
        flow += f;
        ed.flow += f;
        e[cur[x] ^ 1].flow -= f;
        a -= f;
        if (a == 0) break;
      }
    }
    return flow;
  }
  void addEdge(int from, int to, int cap) {
    e[cnt] = Edge(from, to, cap, 0);
    int tmp = head[from];
    head[from] = cnt;
    nxt[cnt++] = tmp;
    e[cnt] = Edge(to, from, 0, 0);
    tmp = head[to];
    head[to] = cnt;
    nxt[cnt++] = tmp;
  }
  void init() { cnt = node = 0; }
  int maxFlow() {
    int flow = 0;
    while (bfs()) {
      for (int i = 0; i < node; i++) cur[i] = head[i];
      flow += dfs(s, inf);
    }
    return flow;
  }
  void buildGraph(int n) {
    memset(head, -1, sizeof(head));
    node = n + 1;
    s = node++, t = node++;
    for (int i = 1; i <= n; i++)
      if (a[i] & 1) {
        addEdge(s, i, 2);
        for (int j = 1; j <= n; j++)
          if (!p[a[i] + a[j]]) addEdge(i, j, 1);
      } else
        addEdge(i, t, 2);
  }
} dinic;
void init() {
  for (int i = 2; i < M; i++)
    for (int j = i + i; j < M; j += i) p[j] = 1;
}
int getans() {
  dinic.init();
  dinic.buildGraph(n);
  if (dinic.maxFlow() != n) return 0;
  for (int i = 0; i < dinic.cnt; i += 2) {
    int x = dinic.e[i].from, y = dinic.e[i].to;
    if (x <= n && y <= n && dinic.e[i].cap == dinic.e[i].flow) {
      v[x].push_back(y);
      v[y].push_back(x);
    }
  }
  int ret = 0;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      ret++;
      aa[ret].push_back(i);
      vis[i] = 1;
      for (int j = v[i][0], last = i; j != i;) {
        aa[ret].push_back(j);
        vis[j] = 1;
        int t = v[j][0] == last;
        last = j;
        j = v[j][t];
      }
    }
  return ret;
}
int main() {
  init();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  ans = getans();
  if (ans) {
    printf("%d\n", ans);
    for (int i = 1; i <= ans; i++) {
      printf("%d", aa[i].size());
      for (int j = 0; j < aa[i].size(); j++) printf(" %d", aa[i][j]);
      puts("");
    }
  } else
    puts("Impossible");
  return 0;
}