You are given r rows, each containing exactly c integers. Two rows belong to the same group when they contain the same values with the same multiplicities, regardless of order (i.e. they are equal as multisets). Count how many distinct groups the rows form.
Input format
Line 1: two integers r and c.
Next r lines: each contains c space-separated integers, one row.
Output format
A single integer: the number of distinct multiset groups.
Constraints
- 1 <= r <= 2000
- 1 <= c <= 50
- -1000000000 <= each value <= 1000000000