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;
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T s = BigMod(b, p / 2, m);
    return ((s % m) * (s % m)) % m;
  }
  return ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
}
template <typename T>
T ModInv(T b, T m) {
  return BigMod(b, m - 2, m);
}
template <typename T>
T in() {
  char ch;
  T n = 0;
  bool ng = false;
  while (1) {
    ch = getchar();
    if (ch == '-') {
      ng = true;
      ch = getchar();
      break;
    }
    if (ch >= '0' && ch <= '9') break;
  }
  while (1) {
    n = n * 10 + (ch - '0');
    ch = getchar();
    if (ch < '0' || ch > '9') break;
  }
  return (ng ? -n : n);
}
template <typename T>
T POW(T B, T printf) {
  if (printf == 0) return 1;
  if (printf & 1)
    return B * POW(B, printf - 1);
  else
    return (POW(B, printf / 2) * POW(B, printf / 2));
}
template <typename T>
T Bigmod(T b, T p, T m) {
  if (p == 0)
    return 1;
  else if (!(p & 1))
    return (Bigmod(b, p / 2, m) * Bigmod(b, p / 2, m)) % m;
  else
    return ((b % m) * Bigmod(b, p - 1, m)) % m;
}
template <typename T>
T Dis(T x1, T y1, T x2, T y2) {
  return sqrt((x1 - x2 * x1 - x2) + (y1 - y2 * y1 - y2));
}
template <typename T>
T Angle(T x1, T y1, T x2, T y2) {
  return atan(double(y1 - y2) / double(x1 - x2));
}
template <typename T>
T DIFF(T a, T b) {
  T d = a - b;
  if (d < 0)
    return -d;
  else
    return d;
}
template <typename T>
T ABS(T a) {
  if (a < 0)
    return -a;
  else
    return a;
}
template <typename T>
T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
template <typename T>
T euclide(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclide(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclide(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclide(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <typename T>
void ia(T a[], int n) {
  for (int i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void pa(T a[], int n) {
  for (int i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
template <typename T>
long long int isLeft(T a, T b, T c) {
  return (a.x - b.x) * (b.y - c.y) - (b.x - c.x) * (a.y - b.y);
}
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
template <class T, class first>
inline T togglebit(T a, first i) {
  T t = 1;
  return (a ^ (t << i));
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int toLlint(string s) {
  long long int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int cdigittoint(char ch) { return ch - '0'; }
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
bool isConst(char ch) {
  if (isalpha(ch) && !isVowel(ch)) return true;
  return false;
}
double DEG(double x) { return (180.0 * x) / (2.0 * acos(0.0)); }
double RAD(double x) { return (x * (double)2.0 * acos(0.0)) / (180.0); }
struct edge {
  int a, b, cap, flow;
  edge(int _a, int _b, int _c, int _d) {
    a = _a;
    b = _b;
    cap = _c;
    flow = _d;
  }
};
struct Dinitz {
  int n, s, t, d[5001], ptr[5001];
  vector<edge> e;
  vector<int> g[5001];
  void AddEdge(int a, int b, int cap) {
    edge e1 = edge(a, b, cap, 0);
    edge e2 = edge(b, a, 0, 0);
    g[a].push_back(e.size());
    e.push_back(e1);
    g[b].push_back(e.size());
    e.push_back(e2);
  }
  bool Bfs() {
    queue<int> q;
    q.push(s);
    memset(d, -1, sizeof d);
    d[s] = 0;
    while (!q.empty() && d[t] == -1) {
      int u = q.front();
      q.pop();
      for (int i = 0; i < g[u].size(); i++) {
        int id = g[u][i];
        int v = e[id].b;
        if (d[v] == -1 && e[id].flow < e[id].cap) {
          q.push(v);
          d[v] = d[u] + 1;
        }
      }
    }
    return d[t] != -1;
  }
  int Dfs(int v, int flow) {
    if (!flow) return 0;
    if (v == t) return flow;
    for (; ptr[v] < g[v].size(); ptr[v]++) {
      int id = g[v][ptr[v]];
      int to = e[id].b;
      if (d[to] != d[v] + 1) continue;
      int pushed = Dfs(to, min(flow, e[id].cap - e[id].flow));
      if (pushed) {
        e[id].flow += pushed;
        e[id ^ 1].flow -= pushed;
        return pushed;
      }
    }
    return 0;
  }
  int dinitz() {
    int flow = 0;
    while (1) {
      if (!Bfs()) break;
      memset(ptr, 0, sizeof ptr);
      while (int pushed = Dfs(s, (1 << 30) - 1 + (1 << 30))) {
        flow += pushed;
        if (pushed == 0) break;
      }
    }
    return flow;
  }
  Dinitz(int _n, int _s, int _t) {
    n = _n;
    s = _s;
    t = _t;
  }
};
bool vis[20007];
int a[300007];
bool ok[20007];
bool chk[20007];
vector<int> adj[2007];
vector<int> ans[2007];
void Dfs(int u, int id) {
  chk[u] = 1;
  ans[id].push_back(u);
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (chk[v]) continue;
    Dfs(v, id);
  }
}
void Sieve() {
  vis[1] = 1;
  for (int i = 2; i < 20007; i++) {
    if (!vis[i]) {
      for (int j = 2 * i; j < 20007; j += i) vis[j] = 1;
    }
  }
}
int main() {
  Sieve();
  int(n);
  scanf("%d", &n);
  int N = n + 2, Src = 0, Trg = n + 1;
  Dinitz MxFlow = Dinitz(N, Src, Trg);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2)
      MxFlow.AddEdge(Src, i, 2);
    else
      MxFlow.AddEdge(i, Trg, 2);
    for (int j = 1; j < i; j++) {
      if (vis[a[i] + a[j]] == 0) {
        int u = i, v = j;
        if (a[u] % 2 == 0) swap(u, v);
        MxFlow.AddEdge(u, v, 1);
      }
    }
  }
  int flow = MxFlow.dinitz();
  if (flow != n) {
    puts("Impossible");
    return 0;
  }
  for (int i = 0; i < MxFlow.e.size(); i++) {
    if (MxFlow.e[i].a != Src && MxFlow.e[i].b != Trg && MxFlow.e[i].flow > 0) {
      adj[MxFlow.e[i].a].push_back(MxFlow.e[i].b);
      adj[MxFlow.e[i].b].push_back(MxFlow.e[i].a);
    }
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (!chk[i]) {
      Dfs(i, ++cnt);
    }
  }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; i++) {
    printf("%d ", ans[i].size());
    for (int j = 0; j < ans[i].size(); j++) {
      printf("%d ", ans[i][j]);
    }
    printf("\n");
    ;
  }
  return 0;
}