In ICPCCamp, there are n switches and m bulbs.The m bulbs are ON at the beginning.
Bobo knows in advance an n x m binary matrix Ci, j. When the i-th switch is pressed, all the bulbs j satisfying Ci, j = 1 flip its state between ON and OFF.
Let f(S) be the number of bulbs staying ON after the switches in set S is pressed. Find the sum of f(S)3 (cubic of f(S)) modulo (109+7) over all 2n possible choices of S.
输入描述:
The input consists of several test cases and is terminated by end-of-file.
The first line of each test case contains two integers n and m.
The i-th of the following n lines contains m integers Ci, 1, Ci, 2, ..., Ci, m.
输出描述:
For each test case, print an integer which denotes the result.
示例1
说明
For the first sample, there are 22 = 4 choices of S.
*
, f(S) = 2,
.
* S = {1}, f(S) = 1,
.
* S = {2}, f(S) = 1,
.
* S = {1, 2}, f(S) = 0,
.
Thus, the result is 8 + 1 + 1 + 0 = 10.
备注:
* 1 ≤ n ≤ 50
* 1 ≤ m ≤ 1000
* Ci, j ∈ {0, 1}
* The number of test cases does not exceed 500.
* The number of test cases with m > 50 does not exceed 1.