There is a square grid with N rows and M columns. Each square contains an integer: 0 or 1. The square at the i-th row from the top and the j-th column from the left contains a_{ij}.

Among the 2^{N+M} possible pairs of a subset A of the rows and a subset B of the columns, find the number of the pairs that satisfy the following condition, modulo 998244353:

* The sum of the |A||B| numbers contained in the intersection of the rows belonging to A and the columns belonging to B, is odd.

Constraints

* 1 \leq N,M \leq 300
* 0 \leq a_{i,j} \leq 1(1\leq i\leq N,1\leq j\leq M)
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N M
a_{11} ... a_{1M}
:
a_{N1} ... a_{NM}


Output

Print the number of the pairs of a subset of the rows and a subset of the columns that satisfy the condition, modulo 998244353.

Examples

Input

2 2
0 1
1 0


Output

6


Input

2 3
0 0 0
0 1 0


Output

8
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N, M] = [long(input_raw[0]), long(input_raw[1])]
    A = []
    A_str = []
    for i in range(N):
        input_raw = read_func().strip().split()
        A_str.append(input_raw)
    is_all_zero_set = set([])
    for i in range(M):
        is_all_zero = True
        for j in range(N):
            if A_str[j][i] != "0":
                is_all_zero = False
                break
        if is_all_zero == True:
            is_all_zero_set.add(i)


    for i in range(N):
        col = -1
        a = 0
        for j in range(M):
            if j in is_all_zero_set:
                continue
            col += 1
            a += int(A_str[i][j]) << col
        A.append(a)
    M_new = col + 1
##    is_set = set([])
##    is_all_zero_set = set([])
##    A_ = [0 for i in range(N)]
##    all_zero_count = 0

##    for i in range(max(M, N)):
##        is_all_zero = True
##        for j in range(N):
##            if (A[j] & (0x01 << i)) > 0 and j not in is_set:
##                A_[i] = A[j]
##                is_set.add(j)
##                break

##    for i in range(max(M, N)):
##        is_all_zero = True
##        for j in range(N):
##            if (A[j] & (0x01 << i)) > 0:
##                is_all_zero =False
##            if (A[j] & (0x01 << i)) > 0 and j not in is_set:
##                A_[i] = A[j]
##                is_set.add(j)
##                is_all_zero =False
##                break
##        if is_all_zero == True:
##            is_all_zero_set.add(i)
##            all_zero_count += 1
##            for j in range(N):
##                if j not in is_set:
##                    A_[i] = A[j]
##                    is_set.add(j)
##                    break

    for i in range(min(N, M_new)):
        if (A[i] >> i) & 0x01 == 0:
            for j in range(i + 1, N):
                if (A[j] >> i) & 0x01 > 0:
                    tmp = A[j]
                    A[j] = A[i]
                    A[i] = tmp

        for j in range(N):
            if j == i:
                continue
            if ((A[j] >> i) & 0x01) > 0:
                A[j] = A[j] ^ A[i]
    r = 0
    for i in range(N):
        if A[i] != 0:
            r += 1
    k = N - min(r, M_new)
    count1 = 1L
    for i in range(M-1):
        count1 = (count1 * 2L)%998244353
    count2 = 1L
    for i in range(N):
        count2 = (count2 * 2L)%998244353
    count3 = 1L
    for i in range(k):
        count3 = (count3 * 2L)%998244353
    count = (count1 * ((count2 - count3) %998244353))%998244353
    print count



if __name__ == '__main__':
    main()
