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 GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")
using namespace std;
const int N = 100500;
const int M = 100500;
struct Edge {
  int v, u, c, flow;
};
Edge e[M];
int h = 0;
vector<int> g[N];
void addEdge(int v, int u, int c, int rc = 0) {
  g[v].push_back(h);
  e[h++] = Edge({v, u, c, 0});
  g[u].push_back(h);
  e[h++] = Edge({u, v, rc, 0});
}
int d[N];
int ptr[N];
int source = 0;
int sink = N - 1;
bool bfs(int W) {
  for (int i = 0; i < N; ++i) d[i] = 0;
  queue<int> q;
  q.push(source);
  d[source] = 1;
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (auto to : g[v]) {
      Edge ed = e[to];
      if (!d[ed.u] && ed.c - ed.flow >= W) {
        d[ed.u] = d[v] + 1;
        q.push(ed.u);
      }
    }
  }
  return d[sink] != 0;
}
int dfs(int v, int flow, int W) {
  if (v == sink) return flow;
  for (int &i = ptr[v]; i < g[v].size(); ++i) {
    int to = g[v][i];
    Edge ed = e[to];
    if (d[ed.u] == d[v] + 1 && ed.c - ed.flow >= W) {
      int res = dfs(ed.u, min(flow, ed.c - ed.flow), W);
      if (res) {
        e[to].flow += res;
        e[to ^ 1].flow -= res;
        return res;
      }
    }
  }
  return 0;
}
int dinic() {
  for (int i = 0; i < h; ++i) {
    e[i].flow = 0;
  }
  int flow = 0;
  for (int W = 1e9; W; W >>= 1) {
    while (true) {
      if (!bfs(W)) break;
      for (int i = 0; i < N; ++i) ptr[i] = 0;
      while (int res = dfs(source, 1e9, W)) {
        flow += res;
      }
    }
  }
  return flow;
}
vector<int> w;
vector<pair<int, int>> a, b;
int n;
bool u[500];
void dfs1(int v) {
  u[v] = 1;
  if (v > n)
    w.push_back(b[v - n - 1].second);
  else
    w.push_back(a[v - 1].second);
  for (auto to : g[v]) {
    Edge ed = e[to];
    if (ed.u != sink && ed.u != source && !u[ed.u] && ed.flow != 0) {
      dfs1(ed.u);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    if (x & 1) {
      b.push_back({x, i});
    } else {
      a.push_back({x, i});
    }
  }
  n = a.size();
  if (a.size() != b.size()) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    addEdge(source, i + 1, 2);
  }
  for (int i = 0; i < n; ++i) {
    addEdge(i + 1 + n, sink, 2);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      int x = a[i].first + b[j].first;
      bool first = 1;
      for (int i = 2; i * i <= x; ++i)
        if (x % i == 0) {
          first = 0;
          break;
        }
      if (first) {
        addEdge(i + 1, j + 1 + n, 1);
      }
    }
  }
  int res = dinic();
  if (res == 2 * n) {
    vector<int> ans[300];
    int cnt = 0;
    for (int i = 0; i < n; ++i) {
      if (!u[i + 1]) {
        w.clear();
        dfs1(i + 1);
        for (auto i : w) {
          ans[cnt].push_back(i);
        }
        cnt++;
      }
    }
    cout << cnt << '\n';
    for (int i = 0; i < cnt; ++i) {
      cout << ans[i].size() << ' ';
      for (auto j : ans[i]) cout << j << ' ';
      cout << '\n';
    }
  } else {
    cout << "Impossible\n";
    return 0;
  }
  return 0;
}