题目描述
Cat Cink is participating in a party in Prime Kingdom. There are n Cates there (include Cat Cink). The i-th Cat is ai years old.
They will have dinner around some round tables. You want to distribute Cates such that:
Each Cat is sitting at some table.
Each table has at least 3 Cats sitting around it.
The sum of ages of any two adjacent Cats around each table should be a prime number.
If k Cats c1, c2, ..., ck are sitting around table in clockwise order, then for 1 ≤ i ≤ k - 1: ci and ci + 1 are adjacent, and c1 and ck are also adjacent.
If it is possible to distribute the Cats 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 Cats 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 (): the number of tables.
Then output m lines, each line should start with an integer k -=– the number of Cats around that table, and then k numbers — indices of Cat sitting around that table in clockwise order.
If there are several possible arrangements, output any of them.
SAMPLE INPUT
4
3 4 8 9
SAMPLE OUTPUT
1
4 1 2 4 3
输入格式
见题面
输出格式
见题面