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;
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <class T>
inline T BigMod(T Base, T power, T M = 1000000007) {
  if (power == 0) return 1;
  if (power & 1)
    return ((Base % M) * (BigMod(Base, power - 1, M) % M)) % M;
  else {
    T y = BigMod(Base, power / 2, M) % M;
    return (y * y) % M;
  }
}
template <class T>
inline T ModInv(T A, T M = 1000000007) {
  return BigMod(A, M - 2, M);
}
int fx[] = {-1, +0, +1, +0, +1, +1, -1, -1, +0};
int fy[] = {+0, -1, +0, +1, +1, -1, +1, -1, +0};
int day[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
namespace mf {
const int MAXN = 10004;
struct edge {
  int a, b, cap, flow;
  edge(int _a, int _b, int _c, int _d) { a = _a, b = _b, cap = _c, flow = _d; }
};
int INF = 1500000001;
int n, s, t, d[MAXN * 2], ptr[MAXN * 2], q[MAXN * 2 * 10];
vector<edge> e;
vector<int> g[MAXN * 2];
void addEdge(int a, int b, int cap, int cap2 = 0) {
  edge e1 = edge(a, b, cap, 0);
  edge e2 = edge(b, a, cap2, 0);
  g[a].push_back((int)e.size());
  e.push_back(e1);
  g[b].push_back((int)e.size());
  e.push_back(e2);
}
bool bfs() {
  int qh = 0, qt = 0;
  q[qt++] = s;
  memset(d, -1, sizeof d);
  d[s] = 0;
  while (qh < qt && d[t] == -1) {
    int v = q[qh++];
    for (size_t i = 0; i < g[v].size(); ++i) {
      int id = g[v][i], to = e[id].b;
      if (d[to] == -1 && e[id].flow < e[id].cap) {
        q[qt++] = to;
        d[to] = d[v] + 1;
      }
    }
  }
  return d[t] != -1;
}
int dfs(int v, int flow) {
  if (!flow) return 0;
  if (v == t) return flow;
  for (; ptr[v] < (int)g[v].size(); ++ptr[v]) {
    int id = g[v][ptr[v]], to = e[id].b;
    if (d[to] != d[v] + 1) continue;
    int pushed = dfs(to, min(flow, e[id].cap - e[id].flow));
    if (pushed) {
      e[id].flow += pushed;
      e[id ^ 1].flow -= pushed;
      return pushed;
    }
  }
  return 0;
}
long long dinic() {
  long long flow = 0;
  for (;;) {
    if (!bfs()) break;
    memset(ptr, 0, sizeof ptr);
    while (int pushed = dfs(s, INF)) {
      flow += (long long)pushed;
      if (pushed == 0) break;
    }
  }
  return flow;
}
void init(int src, int dest, int nodes) {
  e.clear();
  for (int i = 0; i <= n + n; i++) g[i].clear();
  n = nodes;
  s = src;
  t = dest;
}
};  // namespace mf
int prime[500005], p, flag[500005];
void sieve(int n) {
  double z = sqrt(n);
  for (int i = 4; i <= n; i += 2) flag[i] = 1;
  for (int i = 3; i <= z; i += 2) {
    if (!flag[i]) {
      for (long long j = i * i; j <= n; j += i + i) flag[j] = 1;
    }
  }
  prime[p++] = 2;
  for (int i = 3; i <= n; i += 2) {
    if (!flag[i]) prime[p++] = i;
  }
}
int nn, arr[500005];
vector<int> v[500005], ans[500005];
int vis[500005], cnt;
void dfs(int s) {
  if (vis[s]) return;
  vis[s] = 1;
  ans[cnt].push_back(s);
  for (auto it : v[s]) {
    if (!vis[it]) dfs(it);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  sieve(100000);
  cin >> nn;
  for (int i = 0; i < nn; i++) {
    cin >> arr[i];
  }
  mf::init(0, nn + 1, nn + 3);
  for (int i = 0; i < nn; i++) {
    for (int j = i + 1; j < nn; j++) {
      if (!flag[arr[i] + arr[j]]) {
        if (arr[i] & 1)
          mf::addEdge(i + 1, j + 1, 1);
        else
          mf::addEdge(j + 1, i + 1, 1);
      }
    }
  }
  int pnt = 0;
  for (int i = 0; i < nn; i++) {
    if (arr[i] & 1)
      mf::addEdge(0, i + 1, 2), pnt++;
    else
      mf::addEdge(i + 1, nn + 1, 2);
  }
  int x = mf::dinic();
  if (x != nn || pnt != nn - pnt)
    cout << "Impossible";
  else {
    for (int i = 0; i < nn; i++) {
      int sz = mf::g[i + 1].size();
      for (int j = 0; j < sz; j++) {
        int indx = mf::g[i + 1][j];
        if (mf::e[indx].flow == 1) {
          int a = mf::e[indx].a;
          int b = mf::e[indx].b;
          v[a].push_back(b);
          v[b].push_back(a);
        }
      }
    }
    for (int i = 1; i <= nn; i++) {
      if (!vis[i]) {
        cnt++;
        dfs(i);
      }
    }
    cout << cnt << endl;
    for (int i = 1; i <= cnt; i++) {
      cout << ans[i].size() << " ";
      for (auto it : ans[i]) cout << it << " ";
      cout << endl;
    }
  }
  return 0;
}
