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;
using ll = long long;
const long long inf = 2147383647;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
mt19937 rng(std::chrono::duration_cast<std::chrono::nanoseconds>(
                chrono::high_resolution_clock::now().time_since_epoch())
                .count());
template <typename S, typename T>
void xmin(S &a, T const &b) {
  if (b < a) a = b;
}
template <typename S, typename T>
void xmax(S &a, T const &b) {
  if (b > a) a = b;
}
struct debugger {
  template <typename T>
  debugger &operator,(const T &v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
long long ext_gcd(long long A, long long B, long long *X, long long *Y) {
  long long x2, y2, x1, y1, x, y, r2, r1, q, r;
  x2 = 1;
  y2 = 0;
  x1 = 0;
  y1 = 1;
  for (r2 = A, r1 = B; r1 != 0;
       r2 = r1, r1 = r, x2 = x1, y2 = y1, x1 = x, y1 = y) {
    q = r2 / r1;
    r = r2 % r1;
    x = x2 - (q * x1);
    y = y2 - (q * y1);
  }
  *X = x2;
  *Y = y2;
  return r2;
}
inline long long modInv(long long a, long long m) {
  long long x, y;
  ext_gcd(a, m, &x, &y);
  x %= m;
  if (x < 0) x += m;
  return x;
}
inline long long power(long long a, long long p) {
  long long res = 1, x = a;
  while (p) {
    if (p & 1) res = (res * x);
    x = (x * x);
    p >>= 1;
  }
  return res;
}
inline long long bigmod(long long a, long long p, long long m) {
  long long res = 1 % m, x = a % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
signed gen(int T) {
  auto get_rand = [&](int64_t l, int64_t r) {
    return uniform_int_distribution<int64_t>(l, r)(rng);
  };
  auto get_double = [&](double l, double r) {
    return uniform_real_distribution<double>(l, r)(rng);
  };
  ofstream o("gen.txt");
  o << T << "\n";
  for (int cas = 0; cas < T; ++cas) {
    o << "\n";
  }
  o << endl;
  o.close();
  return 0;
}
long long push_count = 0;
long long arc_scans = 0;
template <typename flow_t = long long>
struct PushRelabel {
  struct Edge {
    int to, rev;
    flow_t f, c;
  };
  vector<vector<Edge>> g;
  vector<flow_t> ec;
  vector<Edge *> cur;
  vector<vector<int>> hs;
  vector<int> H;
  PushRelabel(int n) : g(n), ec(n), cur(n), hs(2 * n), H(n) {}
  int add_edge(int s, int t, flow_t cap, flow_t rcap = 0) {
    if (s == t) return -1;
    Edge a = {t, (int)g[t].size(), 0, cap};
    Edge b = {s, (int)g[s].size(), 0, rcap};
    g[s].push_back(a);
    g[t].push_back(b);
    return b.rev;
  }
  void add_flow(Edge &e, flow_t f) {
    ++push_count;
    Edge &back = g[e.to][e.rev];
    if (!ec[e.to] && f) hs[H[e.to]].push_back(e.to);
    e.f += f;
    e.c -= f;
    ec[e.to] += f;
    back.f -= f;
    back.c += f;
    ec[back.to] -= f;
  }
  flow_t max_flow(int s, int t) {
    push_count = arc_scans = 0;
    int v = g.size();
    H[s] = v;
    ec[t] = 1;
    vector<int> co(2 * v);
    co[0] = v - 1;
    for (int i = 0; i < v; ++i) cur[i] = g[i].data();
    for (auto &e : g[s]) add_flow(e, e.c);
    if (hs[0].size())
      for (int hi = 0; hi < 2 * v;) {
        int u = hs[hi].back();
        hs[hi].pop_back();
        while (ec[u] > 0)
          if (cur[u] == g[u].data() + g[u].size()) {
            int hii = H[u];
            H[u] = 1e9;
            for (auto &e : g[u])
              if (e.c && H[u] > H[e.to] + 1) H[u] = H[e.to] + 1, cur[u] = &e;
            if (++co[H[u]], !--co[hii] && hii < v)
              for (int i = 0; i < v; ++i)
                if (hii < H[i] && H[i] < v) {
                  --co[H[i]];
                  H[i] = v + 1;
                }
          } else if (cur[u]->c && H[u] == H[cur[u]->to] + 1)
            add_flow(*cur[u], min(ec[u], cur[u]->c));
          else
            ++cur[u];
        if (hi) --hi;
        while (hi < 2 * v && hs[hi].empty()) ++hi;
      }
    return -ec[s];
  }
};
const int N = 20000;
vector<bool> sieve(N + 1, true);
void init() {
  for (long long i = (2); i <= (N); ++i) {
    if (sieve[i]) {
      for (int j = i * i; j <= N; j += i) {
        sieve[j] = false;
      }
    }
  }
}
vector<vector<int>> graph;
vector<bool> vis;
vector<int> path;
void dfs(int u) {
  vis[u] = true;
  path.push_back(u);
  for (int v : graph[u]) {
    if (not vis[v]) {
      dfs(v);
    }
  }
}
signed main() {
  init();
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> A(n);
  for (int &x : A) {
    cin >> x;
  }
  vector<int> even, odd;
  for (long long i = (0); i <= (n - 1); ++i) {
    if ((((A[i]) & 1) == 0 ? (0) : (1))) {
      odd.push_back(i);
    } else {
      even.push_back(i);
    }
  }
  int source = n, sink = n + 1, N = n + 2;
  PushRelabel<long long> pr(N);
  for (int x : even) {
    pr.add_edge(source, x, 2);
  }
  for (int x : odd) {
    pr.add_edge(x, sink, 2);
  }
  for (int x : even) {
    for (int y : odd) {
      if (sieve[A[x] + A[y]]) {
        pr.add_edge(x, y, 1);
      }
    }
  }
  int flow = pr.max_flow(source, sink);
  if (flow != n) {
    cout << "Impossible\n";
  } else {
    graph.assign(n, {});
    for (int x : even) {
      for (auto &ed : pr.g[x]) {
        int y = ed.to;
        if (y != source and ed.f) {
          graph[x].push_back(y);
          graph[y].push_back(x);
        }
      }
    }
    vis.assign(n, false);
    vector<vector<int>> tables;
    for (long long i = (0); i <= (n - 1); ++i) {
      if (not vis[i]) {
        path.clear();
        dfs(i);
        tables.push_back(path);
      }
    }
    cout << ((long long)(tables).size()) << "\n";
    for (auto &table : tables) {
      cout << ((long long)(table).size());
      for (int x : table) {
        cout << ' ' << x + 1;
      }
      cout << "\n";
    }
  }
  return 0;
}