#include <bits/stdc++.h>
using namespace std;

const int maxn = 310, P = 998244353;
int n, m, a[maxn][maxn], b[maxn][maxn];

int qp(int x, int y) {
    int z = 1;
    for (; y; y >>= 1, x = 1LL * x * x % P) {
        if (y & 1)
            z = 1LL * z * x % P;
    }
    return z;
}

int main() {
    scanf("%d %d", &n, &m);
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= m; j++) {
            scanf("%d", &a[i][j]);
        }
    }
    for (int i = 1; i <= n; i++) {
        for (int j = m; j; j--)
            if (a[i][j]) {
                if (b[j][j]) {
                    for (int k = 1; k <= m; k++) {
                        a[i][k] ^= b[j][k];
                    }
                } else {
                    for (int k = 1; k <= m; k++) {
                        b[j][k] = a[i][k];
                    }
                    break;
                }
            }
    }
    int cnt = 0;
    for (int i = 1; i <= m; i++) {
        if (b[i][i])
            cnt++;
    }
    int ans = qp(2, n + m) - qp(2, n + m - cnt) + P;
    printf("%lld\n", 1LL * ans * qp(2, P - 2) % P);
    return 0;
}