Important note: Introduction to Algebra is a prerequisite for this challenge.
Welcome back to Sevenkplus' perfect math class! You are now familiar with the following types of magmas: quasigroup, loop, semigroup, monoid, group, abelian group, rack, and quandle. Furthermore, you are familiar with the magic number of a magma.
Or are you?
The following problem is an exercise to check whether you really are familiar with these definitions.
Find as many magmas as you can, such that no two of them have the same magic number.
Input Format
There is no input for this challenge, your code should print the output in the below mentioned format.
Output Format
The first line, , the number of magmas of different magic numbers you can find. Following are magmas.
For each magma, the first line is a integer , the size of the set . (Yes, you only need to consider finite algebraic structures here, which greatly simplies the problem.) Without loss of generality, we assume that .
Following are lines. Each line contains integers. The -th number on the -th line is where is the binary operation of the magma.
You know, judging homework is not fun. So you should make sure that . Also, Sevenkplus is generous enough to give you a small hint: .
Your answer is considered correct only if is the largest possible, and the magmas are valid and have different magic numbers.
Sample Input
NO INPUT
Sample Output
2
1
0
2
1 1
1 0
Explanation
The sample output is not a correct output. It is there to show the output format.