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 <typename T, typename S>
ostream &operator<<(ostream &os, const pair<T, S> &v) {
  os << "(";
  os << v.first << "," << v.second << ")";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "[";
  long long sz = v.size();
  for (long long i = 0; i < sz; ++i) {
    os << v[i];
    if (i != sz - 1) os << ",";
  }
  os << "]\n";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  T last = *v.rbegin();
  os << "[";
  for (auto it : v) {
    os << it;
    if (it != last) os << ",";
  }
  os << "]\n";
  return os;
}
template <typename T, typename S>
ostream &operator<<(ostream &os, const map<T, S> &v) {
  for (auto it : v) {
    os << it.first << " : " << it.second << "\n";
  }
  return os;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b % 2) {
      res = (res * a) % 1000000007;
    }
    b /= 2;
    a = (a * a) % 1000000007;
  }
  return res;
}
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
  const char *comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long maxn = 2e2 + 5;
long long n, comp;
bool IsPrime[maxn * maxn];
vector<long long> answers[maxn];
vector<bool> visited;
long long src, sink, arr[maxn], graph[maxn][maxn];
long long Bfs() {
  vector<long long> parent(sink + 1, -1);
  parent[src] = src;
  queue<long long> Q;
  Q.push(src);
  while (!Q.empty()) {
    long long curr = Q.front();
    Q.pop();
    for (long long node = src; node <= sink; ++node) {
      if (graph[curr][node] > 0 && parent[node] == -1) {
        parent[node] = curr;
        Q.push(node);
      }
    }
  }
  if (parent[sink] == -1) return 0;
  long long MinRes = 6e3;
  long long curr = sink;
  while (curr != 0) {
    MinRes = min(MinRes, graph[parent[curr]][curr]);
    curr = parent[curr];
  }
  curr = sink;
  while (curr != 0) {
    graph[parent[curr]][curr] -= MinRes;
    graph[curr][parent[curr]] += MinRes;
    curr = parent[curr];
  }
  return MinRes;
}
void dfs(long long node) {
  visited[node] = true;
  answers[comp].push_back(node);
  if (arr[node] % 2) {
    for (long long other_node = 1; other_node <= n; ++other_node) {
      if (!visited[other_node] && arr[other_node] % 2 == 0 &&
          graph[other_node][node] == 1) {
        dfs(other_node);
      }
    }
  } else {
    for (long long other_node = 1; other_node <= n; ++other_node) {
      if (!visited[other_node] && arr[other_node] % 2 == 1 &&
          graph[node][other_node] == 1) {
        dfs(other_node);
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; ++i) cin >> arr[i];
  long long even = 0, odd = 0;
  for (long long i = 1; i <= n; ++i) {
    if (arr[i] & 1) {
      odd++;
    } else {
      even++;
    }
  }
  if (odd != even) {
    cout << "Impossible\n";
    return 0;
  }
  src = 0, sink = n + 1;
  for (long long i = 2; i <= 20000; ++i) {
    IsPrime[i] = true;
  }
  for (long long i = 2; i <= 20000; ++i) {
    if (IsPrime[i]) {
      for (long long j = i * i; j <= 20000; j += i) {
        IsPrime[j] = false;
      }
    }
  }
  for (long long i = 1; i <= n; ++i) {
    if (arr[i] & 1) {
      graph[src][i] = 2;
    } else {
      graph[i][sink] = 2;
    }
  }
  for (long long i = 1; i <= n; ++i) {
    if (arr[i] & 1) {
      for (long long j = 1; j <= n; ++j) {
        if (arr[j] % 2 == 0 && IsPrime[arr[i] + arr[j]]) {
          graph[i][j] = 1;
        }
      }
    }
  }
  long long MaxFlow = 0;
  while (true) {
    long long Flow = Bfs();
    if (Flow == 0) break;
    MaxFlow += Flow;
  }
  visited.resize(sink + 1);
  fill((visited).begin(), (visited).end(), false);
  for (long long i = 1; i <= n; ++i) {
    if (!visited[i]) {
      comp++;
      dfs(i);
    }
  }
  if (MaxFlow != n) {
    cout << "Impossible\n";
    return 0;
  }
  cout << comp << '\n';
  for (long long i = 1; i <= comp; ++i) {
    cout << answers[i].size() << ' ';
    for (auto it : answers[i]) {
      cout << it << ' ';
    }
    cout << endl;
  }
  return 0;
}
