To simplify the building process, XadillaX built some template on the ground. The template is a very big wall and the height of each unit may be different.
8Mao and Hungar have to choose any part of this wall as their own wall.
The part(i, j) means the wall between unit(i) and unit(j) with their heights.
What Hungar thinks a beautiful wall is that the height of each unit is unique.
Now give you a wall-template, you should tell Hungar that how many ways he can choose to copy his own wall?
For each case, you should output the number of ways that Hungar can choose.