#include <bits/stdc++.h>   using namespace std;   void RI() {}   template <typename... T>   void RI(int &head, T &...tail) {     scanf( %d , &head);     RI(tail...);   }   struct Maxflow {     struct E {       int to, cap, rev, rcap, ucap;       E() {}       E(int _to, int _cap, int _rev)           : to(_to), cap(_cap), rev(_rev), rcap(_cap) {}     };     int n;     vector<vector<E> > e;     vector<vector<E>::iterator> cur;     vector<int> dis;     void init(int _n) {       n = _n;       e.resize(n);       cur.resize(n);       dis.resize(n);       for (int i = 0; i < int(n); i++) e[i].clear();     }     void add(int a, int b, int c) {       if (a == b) return;       e[a].push_back(E(b, c, e[b].size()));       e[b].push_back(E(a, 0, e[a].size() - 1));     }     bool bfs() {       fill(dis.begin(), dis.end(), -1);       queue<int> q;       dis[0] = 0;       q.push(0);       while (!q.empty() && dis[n - 1] == -1) {         int p = q.front();         q.pop();         for (auto it = (e[p]).begin(); it != (e[p]).end(); it++) {           if (it->cap == 0 || dis[it->to] != -1) continue;           dis[it->to] = dis[p] + 1;           q.push(it->to);         }       }       return dis[n - 1] != -1;     }     long long go(int p, long long c) {       if (p == n - 1) return c;       long long ret = 0;       for (; cur[p] != e[p].end(); cur[p]++) {         if (cur[p]->cap == 0 || dis[cur[p]->to] != dis[p] + 1) continue;         long long now = go(cur[p]->to, min((long long)cur[p]->cap, c - ret));         ret += now;         cur[p]->cap -= now;         e[cur[p]->to][cur[p]->rev].cap += now;         if (ret == c) break;       }       if (ret == 0) dis[p] = -1;       return ret;     }     long long maxflow() {       long long ret = 0;       while (bfs()) {         for (int i = 0; i < int(n); i++) cur[i] = e[i].begin();         ret += go(0, 1LL << 60);       }       return ret;     }     bool _addPath(int wh, vector<vector<int> > &ans) {       if (wh == n - 1) {         ans.push_back(vector<int>());         ans.back().push_back(wh);         return true;       }       for (auto it = (e[wh]).begin(); it != (e[wh]).end(); it++)         if (it->ucap > 0 && _addPath(it->to, ans)) {           it->ucap--;           ans.back().push_back(wh);           return true;         }       return false;     }     vector<vector<int> > getPath() {       vector<vector<int> > ans;       for (auto it = (e).begin(); it != (e).end(); it++)         for (auto jt = (*it).begin(); jt != (*it).end(); jt++)           jt->ucap = max(0, jt->rcap - jt->cap);       while (_addPath(0, ans)) reverse(ans.back().begin(), ans.back().end());       return ans;     }   } flow;   bool pt[51400];   void predo() {     for (int i = 2; i < 51400; i++)       if (!pt[i])         for (int j = i + i; j < 51400; j += i) pt[j] = 1;   }   int n, a[210];   vector<int> e[210], sol;   bool vis[210];   void dfs(int p) {     sol.push_back(p);     vis[p] = 1;     for (auto it = (e[p]).begin(); it != (e[p]).end(); it++)       if (!vis[*it]) {         dfs(*it);         break;       }   }   int main() {     predo();     RI(n);     for (int i = (1); i <= int(n); i++) RI(a[i]);     int sink = n + 1;     flow.init(sink + 1);     for (int i = (1); i <= int(n); i++) {       if (a[i] % 2 == 0)         flow.add(0, i, 2);       else         flow.add(i, sink, 2);     }     for (int i = (1); i <= int(n); i++)       if (a[i] % 2 == 0)         for (int j = (1); j <= int(n); j++)           if (!pt[a[i] + a[j]]) flow.add(i, j, 1);     int mf = flow.maxflow();     if (mf != n) {       puts( Impossible );       return 0;     }     auto ps = flow.getPath();     for (auto it = (ps).begin(); it != (ps).end(); it++) {       assert(((int)(*it).size()) == 4);       int x = it->at(1);       int y = it->at(2);       e[x].push_back(y);       e[y].push_back(x);     }     for (int i = (1); i <= int(n); i++) assert(((int)(e[i]).size()) == 2);     vector<vector<int> > sols;     for (int i = (1); i <= int(n); i++)       if (!vis[i]) {         sol.clear();         dfs(i);         assert(((int)(sol).size()) % 2 == 0 && ((int)(sol).size()) >= 4);         sols.push_back(sol);       }     printf( %d n , ((int)(sols).size()));     for (auto &s : sols) {       printf( %d , ((int)(s).size()));       for (auto it = (s).begin(); it != (s).end(); it++) printf(  %d , *it);       puts(  );     }     return 0;   }