// #define DEBUGGING
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()

template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
template <typename T, typename U> using P = pair<T, U>;
using ll = int64_t;
using PLL = P<ll, ll>;

template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return max(low, min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { t = clamp(t, low, high); }

namespace __init {

struct InitIO {
    InitIO() {
        cin.tie(nullptr);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

}

#ifdef DEBUGGING
#include "../debug.cpp"
#else
#define DEBUG(...) 0
#define DEBUG_SEPARATOR_LINE 0
#endif

template <typename T>
T make_v(T init) { return init; }

template <typename T, typename... Tail>
auto make_v(T init, size_t s, Tail... tail) {
#define rec make_v(init, tail...)
    return V<decltype(rec)>(s, rec);
#undef rec
}

template <typename T> using V = vector<T>;
template <int N> using BS = bitset<N>;
template <int N> using Matrix = V<BS<N>>;

template <size_t Row, size_t Col>
tuple<Matrix<Col>, BS<Row>, ll> gauss_elim(Matrix<Col> mat, BS<Row> b) {
    ll fcnt = 0;
    ll upper_row = 0;
    for(ll col = 0; col < Col; col++) {
        ll row = -1;
        for(ll r = upper_row; r < mat.size(); r++) {
            if(mat[r].test(col)) {
                row = r;
                break;
            }
        }
        if(row == -1) {
            fcnt++;
            continue;
        }
        swap(mat[upper_row], mat[row]);
        bool tmp = b[upper_row];
        b.set(upper_row, b[row]);
        b.set(row, tmp);
        for(ll r = 0; r < mat.size(); r++) {
            if(r == upper_row) continue;
            if(!mat[r].test(col)) continue;
            mat[r] ^= mat[upper_row];
            bool tmp = b[r] ^ b[upper_row];
            b.set(r, tmp);
        }
        upper_row++;
    }
    return make_tuple(mat, b, fcnt);
}

template <size_t Row, size_t Col>
tuple<Matrix<Col>, ll> gauss_elim(Matrix<Col> mat) {
    auto tmp = gauss_elim<Row, Col>(mat, BS<Row>(0));
    return make_tuple(get<0>(tmp), get<2>(tmp));
}

const ll mod = 998244353;
const ll bsize = 310;

int main() {
    ll N, M;
    cin >> N >> M;
    
    Matrix<bsize> mat;
    for(ll i = 0; i < N; i++) {
        BS<bsize> bs(0);
        for(ll j = 0; j < M; j++) {
            ll a;
            cin >> a;
            bs.set(j, a);
        }
        mat.push_back(move(bs));
    }

    auto result = gauss_elim<bsize, bsize>(mat);
    
    ll rank = bsize - get<1>(result);

    ll ans = 1;
    for(ll i = 0; i < N + rank; i++) (ans *= 2) %= mod;
    ll minus = 1;
    for(ll i = 0; i < rank; i++) (minus *= 2) %= mod;
    minus++;
    for(ll i = 0; i < N - 1; i++) (minus *= 2) %= mod;
    (ans += mod - minus) %= mod;
    for(ll i = 0; i < M - rank; i++) (ans *= 2) %= mod;

    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 384