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;
class ty {
 public:
  ty(int to, int next, int length) : to(to), next(next), length(length){};
  int to;
  int next;
  int length;
};
vector<ty> edge;
vector<int> v[100];
int head[205];
bool prime[30000 + 5];
int a[205];
int d[205];
int vis[205];
vector<int> odd;
vector<int> even;
void insertEdge(int x, int y, int length) {
  edge.emplace_back(y, head[x], length);
  head[x] = edge.size() - 1;
}
void is_prime(int n) {
  for (int i = 2; i <= n; i++)
    if (!prime[i]) {
      for (int j = i * i; j <= n; j += i) {
        prime[j] = true;
      }
    }
}
bool make_level(int s, int t) {
  queue<int> q;
  q.push(s);
  memset(d, 0, sizeof(d));
  d[s] = 1;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    if (x == t) return true;
    for (int i = head[x]; i != -1; i = edge[i].next) {
      int to = edge[i].to;
      if (d[to] == 0 && edge[i].length) {
        d[to] = d[x] + 1;
        q.push(to);
      }
    }
  }
  return false;
}
int dfs(int x, int flow, int t) {
  if (x == t) return flow;
  int sum = 0;
  for (int i = head[x]; i != -1; i = edge[i].next) {
    int to = edge[i].to;
    if (edge[i].length && d[to] == d[x] + 1) {
      int tmp = dfs(to, min(flow - sum, edge[i].length), t);
      edge[i].length -= tmp;
      edge[i ^ 1].length += tmp;
      sum += tmp;
      if (sum == flow) return sum;
    }
  }
  return sum;
}
void dfs1(int x, int cnt, int t) {
  vis[x] = 1;
  for (int i = head[x]; i != -1; i = edge[i].next) {
    int to = edge[i].to;
    if (to > 0 && to < t && a[to] % 2 == 0 && !edge[i].length && !vis[to]) {
      v[cnt].emplace_back(to);
      dfs1(to, cnt, t);
    } else if (to > 0 && to < t && a[to] % 2 == 1 && edge[i].length &&
               !vis[to]) {
      v[cnt].emplace_back(to);
      dfs1(to, cnt, t);
    }
  }
}
int main() {
  int n, max1 = 0;
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  memset(head, -1, sizeof(head));
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      even.emplace_back(i);
    } else
      odd.emplace_back(i);
    max1 = max(max1, a[i]);
  }
  is_prime(2 * max1);
  for (auto it : odd)
    for (auto it1 : even) {
      if (!prime[a[it] + a[it1]]) {
        insertEdge(it, it1, 1);
        insertEdge(it1, it, 0);
      }
    }
  int s = 0, t = n + 1;
  for (auto it : odd) {
    insertEdge(s, it, 2);
    insertEdge(it, s, 0);
  }
  for (auto it : even) {
    insertEdge(it, t, 2);
    insertEdge(t, it, 0);
  }
  int ans = 0;
  while (make_level(s, t)) {
    ans += dfs(s, 0x7f7f7f7f, t);
  }
  if (ans < n) {
    cout << "Impossible\n";
    return 0;
  }
  int cnt = 0;
  for (auto it : odd) {
    if (!vis[it]) {
      cnt++;
      v[cnt].emplace_back(it);
      dfs1(it, cnt, t);
    }
  }
  cout << cnt << '\n';
  for (int i = 1; i <= cnt; i++) {
    cout << v[i].size();
    for (auto it : v[i]) {
      cout << ' ' << it;
    }
    cout << '\n';
  }
  return 0;
}
