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;
struct fastIO {
  inline fastIO operator>>(int& num) {
    num = 0;
    char c = getchar();
    while (c != '-' && (c < '0' || c > '9')) c = getchar();
    bool foo = 0;
    if (c == '-') {
      foo = 1;
      c = getchar();
    }
    while (c >= '0' && c <= '9') {
      num = (num << 3) + (num << 1) + c - '0';
      c = getchar();
    }
    if (foo) num = -num;
    return *this;
  }
  inline fastIO operator>>(long long& num) {
    num = 0;
    char c = getchar();
    while (c != '-' && (c < '0' || c > '9')) c = getchar();
    bool foo = 0;
    if (c == '-') {
      foo = 1;
      c = getchar();
    }
    while (c >= '0' && c <= '9') {
      num = (num << 3) + (num << 1) + c - '0';
      c = getchar();
    }
    if (foo) num = -num;
    return *this;
  }
  inline fastIO operator>>(float& num) {
    scanf("%f", &num);
    return *this;
  }
  inline fastIO operator>>(double& num) {
    scanf("%lf", &num);
    return *this;
  }
  inline fastIO operator>>(long double& num) {
    scanf("%Lf", &num);
    return *this;
  }
  inline fastIO operator>>(char& num) {
    num = getchar();
    while (num == ' ' || num == '\n') num = getchar();
    return *this;
  }
  inline fastIO operator>>(char* num) {
    int cnt = 0;
    char c = getchar();
    while (c == ' ' || c == '\n') c = getchar();
    while (c != ' ' && c != '\n') {
      num[cnt++] = c;
      c = getchar();
    }
    num[cnt] = 0;
    return *this;
  }
  inline fastIO operator>>(string& num) {
    cin >> num;
    return *this;
  }
  inline void printInt(const int& num) {
    if (num < 10) {
      putchar(num + '0');
      return;
    }
    printInt(num / 10);
    putchar((num % 10) + '0');
  }
  inline void printINT(const long long& num) {
    if (num < 10) {
      putchar(num + '0');
      return;
    }
    printINT(num / 10);
    putchar((num % 10) + '0');
  }
  inline fastIO operator<<(const int& num) {
    if (num < 0)
      putchar('-'), printInt(-num);
    else
      printInt(num);
    return *this;
  }
  inline fastIO operator<<(const long long& num) {
    if (num < 0)
      putchar('-'), printINT(-num);
    else
      printINT(num);
    return *this;
  }
  inline fastIO operator<<(const float& num) {
    printf("%.10f", num);
    return *this;
  }
  inline fastIO operator<<(const double& num) {
    printf("%.16lf", num);
    return *this;
  }
  inline fastIO operator<<(const long double& num) {
    printf("%.20Lf", num);
    return *this;
  }
  inline fastIO operator<<(const char& num) {
    putchar(num);
    return *this;
  }
  inline fastIO operator<<(const char* num) {
    for (int i = 0; num[i]; i++) putchar(num[i]);
    return *this;
  }
  inline fastIO operator<<(const string& num) {
    cout << num;
    return *this;
  }
} fio;
struct Edge {
  int to, cap, rev;
  Edge(int to, int cap, int rev) : to(to), cap(cap), rev(rev) {}
};
vector<Edge> egs[1005];
void NewEdge(int u, int v, int cap) {
  egs[u].push_back(Edge(v, cap, ((int)(egs[v]).size())));
  egs[v].push_back(Edge(u, 0, ((int)(egs[u]).size()) - 1));
}
bool lgl[1005];
int dfs(int bg, int en, int cap) {
  if (bg == en) {
    return cap;
  }
  lgl[bg] = 1;
  for (int i = 0; i < ((int)(egs[bg]).size()); i++) {
    if (egs[bg][i].cap && !lgl[egs[bg][i].to]) {
      int dis = dfs(egs[bg][i].to, en, min(cap, egs[bg][i].cap));
      if (dis) {
        egs[bg][i].cap -= dis;
        egs[egs[bg][i].to][egs[bg][i].rev].cap += dis;
        return dis;
      }
    }
  }
  return 0;
}
int n;
int a[205];
bool notsushu[20005];
vector<int> nei[1005];
vector<int> what[1005];
void Dfs(int now, int whr) {
  lgl[now] = 1;
  what[whr].push_back(now);
  for (int i = 0; i < ((int)(nei[now]).size()); i++) {
    if (!lgl[nei[now][i]]) {
      Dfs(nei[now][i], whr);
    }
  }
}
int main() {
  for (int i = 2; i < 20005; i++) {
    if (!notsushu[i]) {
      for (int j = i * i; j < 20005; j += i) {
        notsushu[j] = 1;
      }
    }
  }
  fio >> n;
  int cntji = 0, cntou = 0;
  for (int i = 1; i <= n; i++) {
    fio >> a[i];
    if (a[i] % 2) {
      cntji++;
    } else {
      cntou++;
    }
  }
  if (cntji != cntou) {
    return printf("Impossible\n"), 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if ((a[i] % 2) && !(a[j] % 2) && !notsushu[a[i] + a[j]]) {
        NewEdge(i, j, 1);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2) {
      NewEdge(0, i, 2);
    } else {
      NewEdge(i, n + 1, 2);
    }
  }
  int pip = 0;
  while (1) {
    memset((void*)lgl, 0, sizeof(lgl));
    int go = dfs(0, n + 1, ((int)0x3f3f3f3f));
    if (!go) {
      break;
    }
    pip += go;
  }
  if (pip != n) {
    return printf("Impossible\n"), 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2) {
      for (int j = 0; j < ((int)(egs[i]).size()); j++) {
        if (!egs[i][j].cap) {
          nei[i].push_back(egs[i][j].to);
          nei[egs[i][j].to].push_back(i);
        }
      }
    }
  }
  memset((void*)lgl, 0, sizeof(lgl));
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (!lgl[i]) {
      Dfs(i, cnt++);
    }
  }
  fio << cnt << '\n';
  for (int i = 0; i < cnt; i++) {
    fio << ((int)(what[i]).size());
    for (int j = 0; j < ((int)(what[i]).size()); j++) {
      fio << ' ' << what[i][j];
    }
    fio << '\n';
  }
  return 0;
}