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 N = 400 + 10;
const int M = N * N;
const int P = 20000 + 10;
const int INF = 100;
struct Edge {
  int to, c;
  Edge *pre, *rev;
} edgeBuffer[M], *totEdges = edgeBuffer, *last[N], *from[N];
int notPrime[P];
int a[N];
int n;
int vis[N];
vector<int> ans[N];
void makePrimeTable() {
  for (int i = 2; i < P; ++i) {
    if (!notPrime[i]) {
      for (int j = i + i; j < P; j += i) {
        notPrime[j] = 1;
      }
    }
  }
}
Edge *newEdge(int u, int v, int c) {
  Edge *e = totEdges++;
  e->to = v;
  e->c = c;
  e->pre = last[u];
  last[u] = e;
  return e;
}
void addEdge(int u, int v, int c) {
  Edge *p = newEdge(u, v, c), *q = newEdge(v, u, 0);
  p->rev = q;
  q->rev = p;
}
int bfs(int s, int t) {
  static queue<int> que;
  static int vis[N];
  memset(vis, 0, sizeof vis);
  que.push(s);
  vis[s] = 1;
  for (; !que.empty(); que.pop()) {
    static int u, v;
    u = que.front();
    for (Edge *e = last[u]; e != NULL; e = e->pre) {
      if (e->c == 0) {
        continue;
      }
      v = e->to;
      if (!vis[v]) {
        que.push(v);
        vis[v] = 1;
        from[v] = e;
      }
    }
  }
  return vis[t];
}
int maxFlow(int s, int t) {
  int ret = 0;
  while (bfs(s, t)) {
    int f = INF;
    for (int u = t; u != s; u = from[u]->rev->to) {
      f = min(f, from[u]->c);
    }
    ret += f;
    for (int u = t; u != s; u = from[u]->rev->to) {
      from[u]->c -= f;
      from[u]->rev->c += f;
    }
  }
  return ret;
}
int main() {
  makePrimeTable();
  cin >> n;
  int cntOdd = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int s = n, t = n + 1;
  for (int i = 0; i < n; ++i) {
    if (a[i] & 1) {
      ++cntOdd;
      addEdge(s, i, 2);
      for (int j = 0; j < n; ++j) {
        if (!notPrime[a[i] + a[j]]) {
          addEdge(i, j, 1);
        }
      }
    } else {
      addEdge(i, t, 2);
    }
  }
  if (cntOdd * 2 != n) {
    printf("Impossible\n");
    return 0;
  }
  if (maxFlow(s, t) != n) {
    printf("Impossible\n");
    return 0;
  }
  int tot = 0;
  for (int i = 0; i < n; ++i) {
    if ((a[i] & 1) && !vis[i]) {
      for (int x = i; !vis[x];) {
        vis[x] = 1;
        ans[tot].push_back(x);
        int y;
        for (Edge *e = last[x]; e != NULL; e = e->pre) {
          if (e->c == 0 && !vis[e->to]) {
            y = e->to;
            ans[tot].push_back(y);
            vis[y] = 1;
            break;
          }
        }
        for (Edge *e = last[y]; e != NULL; e = e->pre) {
          if (e->c > 0 && e->to != x) {
            x = e->to;
            break;
          }
        }
      }
      ++tot;
    }
  }
  printf("%d\n", tot);
  for (int i = 0; i < tot; ++i) {
    printf("%d", (int)ans[i].size());
    for (int j = 0; j < (int)ans[i].size(); ++j) {
      printf(" %d", ans[i][j] + 1);
    }
    printf("\n");
  }
  return 0;
}