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;
const int INF = 1000000001;
struct edge {
  int a, b, cap, flow;
  edge() {}
  edge(int _a, int _b, int _c = 0, int _f = 0)
      : a(_a), b(_b), cap(_c), flow(_f) {}
};
vector<edge> all;
vector<int> g[1234];
int n, m, s, t;
int ptr[12345];
int d[12345];
int a[12345];
void add_edge(int a, int b, int c) {
  edge e1(a, b, c);
  edge e2(b, a);
  g[a].push_back(all.size());
  all.push_back(e1);
  g[b].push_back(all.size());
  all.push_back(e2);
}
int dfs(int v, int flow = 1000000000) {
  if (!flow) return 0;
  if (v == t) return flow;
  for (ptr[v]; ptr[v] < g[v].size(); ++ptr[v]) {
    int id = g[v][ptr[v]];
    int to = all[id].b;
    if (d[to] != d[v] + 1) continue;
    int pushed = dfs(to, min(flow, all[id].cap - all[id].flow));
    if (pushed) {
      all[id].flow += pushed;
      all[id ^ 1].flow -= pushed;
      return pushed;
    }
  }
  return 0;
}
bool bfs() {
  for (int i = 0; i < n + 2; ++i) d[i] = -1;
  queue<int> q;
  d[s] = 0;
  q.push(s);
  while (q.size()) {
    int v = q.front();
    q.pop();
    for (int i = 0; i < g[v].size(); ++i) {
      int id = g[v][i];
      int to = all[id].b;
      if (d[to] == -1 && all[id].cap > all[id].flow) {
        d[to] = d[v] + 1;
        q.push(to);
      }
    }
  }
  return d[t] != -1;
}
int dinic() {
  int flow = 0;
  while (true) {
    if (!bfs()) return flow;
    for (int i = 0; i < n + 2; ++i) ptr[i] = 0;
    while (int pushed = dfs(s)) flow += pushed;
  }
  return flow;
}
vector<pair<int, int> > odd(1, make_pair(0, 0)), even(1, make_pair(0, 0));
void dfs2(int v, vector<vector<int> >& gr, vector<char>& used,
          vector<int>& lastComp, bool isOdd) {
  used[v] = 1;
  for (int i = 0; i < gr[v].size(); ++i) {
    int to = i;
    if (!used[to] && gr[v][i]) {
      if (!isOdd)
        lastComp.push_back(odd[i].second);
      else
        lastComp.push_back(even[i - n / 2].second);
      dfs2(to, gr, used, lastComp, !isOdd);
    }
  }
}
int main() {
  srand(time(0));
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] & 1)
      odd.push_back(make_pair(a[i], i));
    else
      even.push_back(make_pair(a[i], i));
  }
  if (odd.size() != even.size()) {
    cout << "Impossible";
    return 0;
  }
  int nn = odd.size() - 1;
  s = 0;
  t = 2 * nn + 1;
  for (int i = 1; i <= nn; ++i) {
    add_edge(0, i, 2);
    add_edge(i + nn, 2 * nn + 1, 2);
    for (int j = 1; j <= nn; ++j) {
      int sum = odd[i].first + even[j].first;
      bool isPr = 1;
      for (int k = 2; k * k <= sum; ++k) {
        if (sum % k == 0) {
          isPr = 0;
          break;
        }
      }
      if (isPr) add_edge(i, j + nn, 1);
    }
  }
  int din = dinic();
  if (din != n) {
    cout << "Impossible\n";
    return 0;
  }
  vector<vector<int> > gr(n + 1, vector<int>(n + 1, 0)), comp;
  for (int i = 0; i < all.size(); ++i) {
    if (all[i].a < all[i].b && all[i].a && all[i].b != 2 * nn + 1) {
      int a = all[i].a;
      int b = all[i].b;
      if (all[i].flow > 0) gr[a][b] = gr[b][a] = 1;
    }
  }
  vector<char> used(n + 1, 0);
  for (int i = 1; i <= nn; ++i) {
    if (!used[i]) {
      comp.push_back(vector<int>(1, odd[i].second));
      dfs2(i, gr, used, comp.back(), true);
    }
  }
  cout << comp.size() << "\n";
  for (int i = 0; i < comp.size(); ++i) {
    cout << comp[i].size() << " ";
    for (int j = 0; j < comp[i].size(); ++j) {
      cout << comp[i][j] << " ";
    }
    cout << "\n";
  }
}
