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;
template <class T>
bool isPrime(T x) {
  if (x <= 1) return false;
  T i;
  for (i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
template <class T>
class Prime {
 public:
  vector<T> z;
  Prime() {
    z.resize(1e5 + 7);
    for (int i = (0); i < (((int)z.size())); i++) z[i] = 1;
    z[0] = 0;
    z[1] = 0;
    T j;
    for (int i = (2); i < (((int)z.size())); i++) {
      if (z[i]) {
        j = i + i;
        while (j < ((int)z.size())) {
          z[j] = 0;
          j += i;
        }
      }
    }
  }
};
template <class T>
double dist(T x1, T y1, T x2, T y2) {
  return sqrt(1. * (x2 - x1) * (x2 - x1) + 1. * (y2 - y1) * (y2 - y1));
}
template <class T>
class Point {
 public:
  T x, y;
  Point() {}
  Point(T a, T b) : x(a), y(b) {}
  bool operator==(const Point& tmp) const { return (x == tmp.x && y == tmp.y); }
  Point operator-(const Point& tmp) const {
    return Point<T>(x - tmp.x, y - tmp.y);
  }
};
char toLowerCase(char x) { return (x + 32); }
char toUpperCase(char x) { return (x - 32); }
bool isUpperCase(char x) { return (65 <= x && x <= 90) ? 1 : 0; }
bool isLowerCase(char x) { return (97 <= x && x <= 122) ? 1 : 0; }
bool isAlpha(char x) { return (isUpperCase(x) || isLowerCase(x)) ? 1 : 0; }
bool isDigit(char x) { return ('0' <= x && x <= '9') ? 1 : 0; }
template <class T>
T toDec(string s) {
  stringstream is(s);
  T res;
  is >> res;
  return res;
}
template <class T>
string toStr(T n) {
  string s;
  stringstream is;
  is << n;
  is >> s;
  return s;
}
template <class T>
void checkmin(T& a, T b) {
  if (a > b) a = b;
}
template <class T>
void checkmax(T& a, T b) {
  if (a < b) a = b;
}
vector<vector<int> > g, ans, ng;
vector<int> visited, parent;
bool bfs(int s, int t) {
  visited = vector<int>(s + 5, 0);
  parent = vector<int>(s + 5, -1);
  queue<int> q;
  q.push(s);
  visited[s] = 1;
  int u;
  while (!q.empty()) {
    u = q.front();
    q.pop();
    if (u == t) return true;
    for (int v = 0; v < s + 5; v++) {
      if (g[u][v] > 0 && !visited[v]) {
        q.push(v);
        parent[v] = u;
        visited[v] = 1;
      }
    }
  }
  return false;
}
int getMaxFlow(int n) {
  int max_flow = 0;
  int path_min = 1e9;
  int u, v;
  while (bfs(n, n + 1)) {
    for (v = n + 1; v != n; v = parent[v]) {
      u = parent[v];
      path_min = min(path_min, g[u][v]);
    }
    for (v = n + 1; v != n; v = parent[v]) {
      u = parent[v];
      g[u][v] -= path_min;
      g[v][u] += path_min;
    }
    max_flow += path_min;
  }
  return max_flow;
}
int main() {
  int n;
  cin >> n;
  g = vector<vector<int> >(n + 5, vector<int>(n + 5, 0));
  vector<int> a(n + 5, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0)
      g[n][i] = 2;
    else
      g[i][n + 1] = 2;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      for (int j = 0; j < n; j++) {
        if (isPrime<int>(a[i] + a[j])) {
          g[i][j] = 1;
        }
      }
    }
  }
  if (getMaxFlow(n) != n)
    cout << "Impossible";
  else {
    ng = vector<vector<int> >(n + 5);
    for (int i = 0; i < n; i++) {
      if (a[i] % 2) {
        for (int j = 0; j < n; j++) {
          if (g[i][j]) {
            ng[i].push_back(j);
            ng[j].push_back(i);
          }
        }
      }
    }
    visited = vector<int>(n + 5);
    int node, prev, tmp;
    for (int i = 0; i < n; i++) {
      if (visited[i]) continue;
      visited[i] = 1;
      prev = i;
      node = ng[i][0];
      vector<int> res;
      res.push_back(i);
      while (node != i) {
        visited[node] = 1;
        res.push_back(node);
        tmp = node;
        node = (prev != ng[node][0] ? ng[node][0] : ng[node][1]);
        prev = tmp;
      }
      ans.push_back(res);
    }
    cout << ((int)ans.size()) << "\n";
    for (int i = 0; i < ((int)ans.size()); i++) {
      cout << ((int)ans[i].size()) << " ";
      for (int j = 0; j < ((int)ans[i].size()); j++) {
        if (j) cout << " ";
        cout << ans[i][j] + 1;
      }
      cout << "\n";
    }
  }
  return 0;
}
