The array is -xorderable if it is possible to rearrange such that for each pair that satisfies , the following conditions must be satisfied after the rearrangement: and . The operator represents the bitwise xor.
You are given another array of length : . Calculate the number of pairs where array is -xorderable for .
输入格式
The first line consists of two integers ( .
The second line consists of integers ( .
The third line consists of integers ( .
输出格式
Output a single integer representing the number of pairs where array is -xorderable for .
样例
样例输入 1
3 4
0 3 0
1 2 1 1
样例输出 1
3
样例输入 2
5 2
0 7 13 22 24
12 10
样例输出 2
1
样例输入 3
3 3
0 0 0
1 2 3
样例输出 3
0
数据范围与提示
Explanation for the sample input/output #1
The array is -xorderable by rearranging the array to .
Explanation for the sample input/output #2
The array is -xorderable by rearranging the array to .