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;
bool is_prime(int n) {
  int count = 0;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
struct FlowEdge {
  int v, u;
  long long cap, maxflow = 0;
  FlowEdge(int v, int u, long long cap) : v(v), u(u), cap(cap) {}
};
struct Dinic {
  const long long flow_inf = 1e18;
  vector<FlowEdge> edges;
  vector<vector<int>> adj;
  int n, m = 0;
  int s, t;
  vector<int> level, ptr;
  queue<int> q;
  Dinic(int n, int s, int t) : n(n), s(s), t(t) {
    adj.resize(n);
    level.resize(n);
    ptr.resize(n);
  }
  void add_edge(int v, int u, long long cap) {
    edges.emplace_back(v, u, cap);
    edges.emplace_back(u, v, 0);
    adj[v].push_back(m);
    adj[u].push_back(m + 1);
    m += 2;
  }
  bool bfs() {
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int id : adj[v]) {
        if (edges[id].cap - edges[id].maxflow < 1) continue;
        if (level[edges[id].u] != -1) continue;
        level[edges[id].u] = level[v] + 1;
        q.push(edges[id].u);
      }
    }
    return level[t] != -1;
  }
  long long dfs(int v, long long pushed) {
    if (pushed == 0) return 0;
    if (v == t) return pushed;
    for (int &cid = ptr[v]; cid < (int)adj[v].size(); cid++) {
      int id = adj[v][cid];
      int u = edges[id].u;
      if (level[v] + 1 != level[u] || edges[id].cap - edges[id].maxflow < 1)
        continue;
      long long tr = dfs(u, min(pushed, edges[id].cap - edges[id].maxflow));
      if (tr == 0) continue;
      edges[id].maxflow += tr;
      edges[id ^ 1].maxflow -= tr;
      return tr;
    }
    return 0;
  }
  long long maxflow() {
    long long f = 0;
    while (true) {
      fill(level.begin(), level.end(), -1);
      level[s] = 0;
      q.push(s);
      if (!bfs()) break;
      fill(ptr.begin(), ptr.end(), 0);
      while (long long pushed = dfs(s, flow_inf)) {
        f += pushed;
      }
    }
    return f;
  }
};
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> inp(n);
  vector<pair<int, int>> even, odd;
  int even1 = 0;
  int odd1 = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> inp[i];
    if (inp[i] % 2 == 0) {
      even1 = 1;
      even.push_back({inp[i], i + 1});
    } else {
      odd1 = 1;
      odd.push_back({inp[i], i + 1});
    }
  }
  if (!odd1 || !even1) {
    cout << "Impossible\n";
    return (0);
  }
  even1 = even.size();
  odd1 = odd.size();
  Dinic A(n + 2, 0, n + 1);
  for (long long int i = 0; i < even1; i++) {
    A.add_edge(0, even[i].second, 2);
    for (int j = 0; j < odd.size(); j++) {
      int temp = even[i].first + odd[j].first;
      if (is_prime(temp)) {
        A.add_edge(even[i].second, odd[j].second, 1);
      }
    }
  }
  for (long long int i = 0; i < odd.size(); i++) {
    A.add_edge(odd[i].second, n + 1, 2);
  }
  int maxflow = A.maxflow();
  if (maxflow == (2 * even1) && maxflow == 2 * odd1) {
    vector<vector<int>> ans;
    int vis[n + 1];
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < even1; i++) {
      if (!vis[even[i].second]) {
        int start = even[i].second;
        vector<int> temp;
        temp.push_back(start);
        vis[start] = 1;
        int rem = start;
        bool is = true;
        do {
          bool may = false;
          for (int j = 0; j < A.edges.size(); j++) {
            if (is) {
              if (A.edges[j].maxflow == 1 && A.edges[j].v == start &&
                  vis[A.edges[j].u] == 0) {
                start = A.edges[j].u;
                temp.push_back(start);
                vis[A.edges[j].u] = 1;
                is = false;
                may = 1;
                break;
              }
            } else {
              if (A.edges[j].maxflow == 1 && A.edges[j].u == start &&
                  vis[A.edges[j].v] == 0) {
                start = A.edges[j].v;
                temp.push_back(start);
                is = 1;
                vis[A.edges[j].v] = 1;
                may = 1;
                break;
              }
            }
          }
          if (!may) {
            break;
          }
        } while (start != rem);
        ans.push_back(temp);
      }
    }
    bool is = true;
    for (long long int i = 1; i < n + 1; i++) {
      if (!vis[i]) {
        cout << "Impossible\n";
        return (0);
      }
    }
    cout << ans.size() << endl;
    for (long long int i = 0; i < ans.size(); i++) {
      cout << ans[i].size() << " ";
      for (int j = 0; j < ans[i].size(); j++) {
        cout << ans[i][j] << ' ';
      }
      cout << endl;
    }
  } else {
    cout << "Impossible\n";
  }
  return (0);
}
