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;
struct BipartiteMatcher {
  vector<vector<long long>> G;
  vector<long long> L, R, Viz;
  BipartiteMatcher(long long n, long long m)
      : G(n), L(n, -1), R(m, -1), Viz(n) {}
  void AddEdge(long long a, long long b) { G[a].push_back(b); }
  bool Match(long long node) {
    if (Viz[node]) return false;
    Viz[node] = true;
    for (auto vec : G[node]) {
      if (R[vec] == -1 || Match(R[vec])) {
        L[node] = vec;
        R[vec] = node;
        return true;
      }
    }
    return false;
  }
  long long Solve() {
    bool ok = true;
    while (ok) {
      ok = false;
      fill(Viz.begin(), Viz.end(), 0);
      for (long long i = 0; i < L.size(); ++i)
        if (L[i] == -1) ok |= Match(i);
    }
    long long ret = 0;
    for (long long i = 0; i < L.size(); ++i) ret += (L[i] != -1);
    return ret;
  }
};
bool isPrime(long long num) {
  if (num < 2) return false;
  for (long long i = 2; i * i <= num; ++i) {
    if (num % i == 0) return false;
  }
  return true;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> arr(n + 1);
  vector<vector<long long>> adj(n + 1);
  long long evens = 0;
  for (long long i = 1; i <= n; ++i) {
    cin >> arr[i];
    if (arr[i] % 2 == 0) evens++;
  }
  if (2 * evens != n) {
    cout << "Impossible\n";
    return 0;
  }
  BipartiteMatcher bm(evens, evens);
  vector<long long> evenPos(n + 1), oddPos(n + 1);
  vector<long long> evenInv(n + 1), oddInv(n + 1);
  long long evenId = 0, oddId = 0;
  for (long long i = 1; i <= n; ++i) {
    if (arr[i] % 2 == 0) {
      evenInv[evenId] = i;
      evenPos[i] = evenId++;
    } else {
      oddInv[oddId] = i;
      oddPos[i] = oddId++;
    }
  }
  for (long long i = 1; i <= n; ++i) {
    for (long long j = i + 1; j <= n; ++j) {
      if (isPrime(arr[i] + arr[j])) {
        if (arr[i] % 2 == 0) {
          bm.AddEdge(evenPos[i], oddPos[j]);
        } else {
          bm.AddEdge(evenPos[j], oddPos[i]);
        }
        adj[i].push_back(j);
        adj[j].push_back(i);
      }
    }
  }
  if (bm.Solve() != evens) {
    cout << "Impossible\n";
    return 0;
  }
  BipartiteMatcher bm2(evens, evens);
  set<pair<long long, long long>> st;
  for (long long i = 0; i < bm.L.size(); ++i) {
    st.insert({i, bm.L[i]});
  }
  for (long long i = 1; i <= n; ++i) {
    for (long long j = i + 1; j <= n; ++j) {
      if (isPrime(arr[i] + arr[j])) {
        if (arr[i] % 2 == 0) {
          if (!st.count({evenPos[i], oddPos[j]}))
            bm2.AddEdge(evenPos[i], oddPos[j]);
        } else {
          if (!st.count({evenPos[j], oddPos[i]}))
            bm2.AddEdge(evenPos[j], oddPos[i]);
        }
        adj[i].push_back(j);
        adj[j].push_back(i);
      }
    }
  }
  if (bm2.Solve() != evens) {
    cout << "Impossible\n";
    return 0;
  }
  vector<vector<long long>> answer;
  vector<bool> seen(n + 1, false);
  for (long long i = 1; i <= n; ++i) {
    if (seen[i]) continue;
    long long node = i;
    vector<long long> tempTable;
    while (true) {
      seen[node] = true;
      tempTable.push_back(node);
      if (arr[node] % 2 == 0) {
        node = oddInv[bm.L[evenPos[node]]];
      } else {
        node = evenInv[bm.R[oddPos[node]]];
      }
      seen[node] = true;
      tempTable.push_back(node);
      if (arr[node] % 2 == 0) {
        node = oddInv[bm2.L[evenPos[node]]];
      } else {
        node = evenInv[bm2.R[oddPos[node]]];
      }
      if (node == i) break;
    }
    answer.push_back(tempTable);
  }
  cout << answer.size() << '\n';
  for (auto &table : answer) {
    cout << table.size() << ' ';
    for (long long &age : table) cout << age << ' ';
    cout << '\n';
  }
  return 0;
}
