program odd_subrectangles
  implicit none
  integer(8), parameter :: md = 998244353_8
  integer :: n, m, a(300,300) = 0, r, i, j
  read(*,*) n, m
  do i = 1, n
    read(*,*) a(i,1:m)
  end do
  r = rank(a(1:n,1:m))
  write(*,'(i0)') modulo(pow(2_8,n+m-1)-pow(2_8,n+m-r-1),md)
contains
  function pow(x,i) result(n)
    integer(8), intent(in) :: x
    integer, intent(in) :: i
    integer(8) :: n, p
    integer :: m
    n = 1_8
    p = x
    m = i
    do while (m > 0)
      if (btest(m,0)) n = mod(p*n,md)
      p = mod(p*p,md)
      m = rshift(m,1)
    end do
  end
  integer function rank(a)
    integer, intent(in) :: a(:,:)
    integer :: x(size(a,1),size(a,2))
    integer :: n, i
    x = a
    call normal_form(x)
    rank = 0
    n = size(a,1)
    do i = n, 1, -1
      if (sum(x(i,:)) == 0) cycle
      rank = i
      exit
    end do
  end
  subroutine normal_form(a)
    integer, intent(inout) :: a(:,:)
    integer :: n, m, i, j, k
    n = size(a,1)
    m = size(a,2)
    i = 1
    do j = 1, m
      if (sum(a(i:n,j)) == 0) cycle
      if (a(i,j) == 0) then
        do k = i+1, n
          if (a(k,j) == 1) then
            a(i,j:m) = mod(a(i,j:m)+a(k,j:m),2)
            exit
          end if
        end do
      end if
      do k = 1, n
        if (k == i) cycle
        if (a(k,j) == 0) cycle
        a(k,j:m) = mod(2+a(k,j:m)-a(i,j:m),2)
      end do
      i = i+1
      if (i > n) exit
    end do
  end
end program odd_subrectangles