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;
namespace Dinic {
const int MAXV = 1000100;
const int MAXE = 1000100;
const long long oo = 1e18;
int V, E;
int last[MAXV], dist[MAXV], curr[MAXV];
int next[MAXE], adj[MAXE];
long long cap[MAXE];
void init(int n) {
  V = n;
  E = 0;
  for (int i = (0); i < (V); ++i) last[i] = -1;
}
void edge(int x, int y, long long c1, long long c2) {
  adj[E] = y;
  cap[E] = c1;
  next[E] = last[x];
  last[x] = E++;
  adj[E] = x;
  cap[E] = c2;
  next[E] = last[y];
  last[y] = E++;
}
long long push(int x, int sink, long long flow) {
  if (x == sink) return flow;
  for (int &e = curr[x]; e != -1; e = next[e]) {
    int y = adj[e];
    if (cap[e] && dist[x] + 1 == dist[y])
      if (long long f = push(y, sink, min(flow, cap[e])))
        return cap[e] -= f, cap[e ^ 1] += f, f;
  }
  return 0;
}
long long run(int src, int sink) {
  long long ret = 0;
  for (;;) {
    for (int i = (0); i < (V); ++i) curr[i] = last[i];
    for (int i = (0); i < (V); ++i) dist[i] = -1;
    queue<int> Q;
    Q.push(src), dist[src] = 0;
    while (!Q.empty()) {
      int x = Q.front();
      Q.pop();
      for (int e = last[x]; e != -1; e = next[e]) {
        int y = adj[e];
        if (cap[e] && dist[y] == -1) Q.push(y), dist[y] = dist[x] + 1;
      }
    }
    if (dist[sink] == -1) break;
    while (long long f = push(src, sink, oo)) {
      ret += f;
    }
  }
  return ret;
}
};  // namespace Dinic
using namespace Dinic;
int ad[105][105];
int a[205];
int pr[20005];
int vi[205];
vector<vector<int> > Adj;
vector<int> vec;
vector<vector<int> > ans;
void dfs(int u) {
  vec.push_back(u);
  int v;
  for (int i = (0); i < (Adj[u].size()); ++i) {
    v = Adj[u][i];
    if (vi[v] == 0) {
      vi[v] = 1;
      dfs(v);
    }
  }
}
int main() {
  for (int i = (1); i < (20005); ++i) {
    pr[i] = 1;
  }
  for (int i = (2); i < (20005); ++i) {
    if (pr[i] == 1) {
      for (int j = 2; i * j < 20005; j++) pr[i * j] = 0;
    }
  }
  int n;
  cin >> n;
  Adj.resize(n + 5);
  init(n + 5);
  for (int i = (1); i < (n + 1); ++i) {
    cin >> a[i];
  }
  int sr = 0;
  int sk = n + 1;
  int eve = 0;
  int odd = 0;
  for (int i = (1); i < (n + 1); ++i) {
    if (a[i] % 2 == 0) {
      edge(sr, i, 2, 0);
      eve++;
    } else {
      edge(i, sk, 2, 0);
      odd++;
    }
  }
  for (int i = (1); i < (n + 1); ++i) {
    for (int j = (1); j < (n + 1); ++j) {
      if (a[i] % 2 == 0 && a[j] % 2 == 1) {
        if (pr[a[i] + a[j]] == 1) edge(i, j, 1, 0);
      }
    }
  }
  if (eve != odd) {
    cout << "Impossible" << endl;
    return 0;
  }
  int fl;
  fl = (int)run(sr, sk);
  if (fl != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  int ed = 0;
  for (int i = (0); i < (n); ++i) ed += 2;
  for (int i = (1); i < (n + 1); ++i) {
    for (int j = (1); j < (n + 1); ++j) {
      if (a[i] % 2 == 0 && a[j] % 2 == 1) {
        if (pr[a[i] + a[j]] == 1) {
          ed++;
          if (cap[ed] == 1) {
            Adj[i].push_back(j);
            Adj[j].push_back(i);
          }
          ed++;
        }
      }
    }
  }
  for (int i = (1); i < (n + 1); ++i) {
    vi[i] = 0;
  }
  for (int i = (1); i < (n + 1); ++i) {
    if (vi[i] == 0) {
      vi[i] = 1;
      vec.clear();
      dfs(i);
      ans.push_back(vec);
    }
  }
  cout << (int)(ans.size()) << endl;
  for (int i = (0); i < (ans.size()); ++i) {
    cout << (int)(ans[i].size()) << " ";
    for (int j = (0); j < (ans[i].size()); ++j) {
      cout << ans[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
