#include using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);++i) #define REPR(i,n) for (int i=(int)(n)-1;i>=0;--i) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i) #define ALL(c) (c).begin(), (c).end() #define valid(y,x,h,w) (0<=y&&y pii; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (bbasic_ostream& operator<<(basic_ostream&os, const C& c){os<<'[';for(auto i=begin(c);i!=end(c);++i)os<<(i==begin(c)?"":" ")<<*i;return os<<']';} templateostream&operator<<(ostream &o,const pair&t){return o<<'('<void output(ostream&,const Tp&){} templatevoid output(ostream &o,const Tp&t){if(N)o<<',';o<(t);output(o,t);} templateostream&operator<<(ostream&o,const tuple&t){o<<'(';output<0,tuple,Ts...>(o,t);return o<<')';} templatevoid output(T t,char z=10){if(t<0)t=-t,putchar(45);int c[20]; int k=0;while(t)c[k++]=t%10,t/=10;for(k||(c[k++]=0);k;)putchar(c[--k]^48);putchar(z);} templatevoid outputs(T t){output(t);} templatevoid outputs(S a,T...t){output(a,32);outputs(t...);} templatevoid output(T *a,int n){REP(i,n)cout<void output(T *a,int n,int m){REP(i,n)output(a[i],m);} templatebool input(T &t){int n=1,c;for(t=0;!isdigit(c=getchar())&&~c&&c-45;); if(!~c)return 0;for(c-45&&(n=0,t=c^48);isdigit(c=getchar());)t=10*t+c-48;t=n?-t:t;return 1;} templatebool input(S&a,T&...t){input(a);return input(t...);} templatebool inputs(T *a, int n) { REP(i,n) if(!input(a[i])) return 0; return 1;} template struct BinMat { typedef bitset Vec; vector v; int h,w; Vec& operator[](int i) { return v[i]; } const Vec& operator[](int i) const { return v[i]; } BinMat() : h(),w() {} BinMat(int h, int w) : v(h), h(h), w(w) {} template BinMat(const vector > &u) : v(u.size()), h(u.size()),w(u[0].size()) { REP(i,h) {v[i]=0; REP(j,w)v[i][j]=u[i][j];} } static BinMat identity(int n) { BinMat A(n,n); REP(i,n) A[i][i] = 1; return A; } BinMat operator*(const BinMat &B) const { BinMat res(h,B.w); REP(i,h)REP(j,B.w)REP(k,w) res[i][j] = res[i][j]^(v[i][k]&B[k][j]); return res; } BinMat& operator*=(const BinMat &B) { return *this = *this * B; } BinMat& operator+=(const BinMat &B) { REP(i,h)v[i]^=B[i]; return *this; } BinMat& operator-=(const BinMat &B) { REP(i,h)v[i]^=B[i]; return *this; } BinMat operator+(const BinMat &B) const { return BinMat(*this)+=B; } BinMat operator-(const BinMat &B) const { return BinMat(*this)-=B; } BinMat pow(ll n) { BinMat A(*this), B = identity(h); for (;n;n>>=1) { if (n&1) B *= A; A *= A;} return B; } friend ostream &operator<<(ostream &os, const BinMat &B) { REP(i,B.h) { REP(j,B.w) os << B[i][j]; os << endl; } return os; } int rank() const { BinMat B(h,w); REP(i,h) B[i] = v[i]; int y,r=0; REP(x,w) { for (y=r; y A(n,70); REP(i,n) { ll a; cin >> a; A[i] = a; } int r = A.rank(); cout << (1LL<