{"raw_statement":[{"iden":"problem statement","content":"There are $N$ sequences of length $M$, denoted as $A_1, A_2, \\ldots, A_N$. The $i$\\-th sequence is represented by $M$ integers $A_{i,1}, A_{i,2}, \\ldots, A_{i,M}$.\nTwo sequences $X$ and $Y$ of length $M$ are said to be similar if and only if the number of indices $i (1 \\leq i \\leq M)$ such that $X_i = Y_i$ is odd.\nFind the number of pairs of integers $(i,j)$ satisfying $1 \\leq i < j \\leq N$ such that $A_i$ and $A_j$ are similar."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2000$\n*   $1 \\leq M \\leq 2000$\n*   $1 \\leq A_{i,j} \\leq 999$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$\n$A_{1,1}$ $A_{1,2}$ $\\ldots$ $A_{1,M}$\n$A_{2,1}$ $A_{2,2}$ $\\ldots$ $A_{2,M}$\n$\\vdots$\n$A_{N,1}$ $A_{N,2}$ $\\ldots$ $A_{N,M}$"},{"iden":"sample input 1","content":"3 3\n1 2 3\n1 3 4\n2 3 4"},{"iden":"sample output 1","content":"1\n\nThe pair $(i,j) = (1,2)$ satisfies the condition because there is only one index $k$ such that $A_{1,k} = A_{2,k}$, which is $k=1$.\nThe pairs $(i,j) = (1,3), (2,3)$ do not satisfy the condition, making $(1,2)$ the only pair that does."},{"iden":"sample input 2","content":"6 5\n8 27 27 10 24\n27 8 2 4 5\n15 27 26 17 24\n27 27 27 27 27\n27 7 22 11 27\n19 27 27 27 27"},{"iden":"sample output 2","content":"5"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}