#include #include #include using namespace std; #define rep(i, a, n) for(ll i = a; i < n; i++) #define rrep(i, a, n) for(ll i = a; i >= n; i--) #define ll long long #define pii pair #define pll pair //constexpr ll MOD = 1000000007; constexpr ll MOD = 998244353; constexpr int IINF = 1001001001; constexpr ll INF = 1LL<<60; template void chmax(t&a,u b){if(a void chmin(t&a,u b){if(b class modint { ll val; static vector> factorial_vec; public: ll get() const { return (ll)val; } // コンストラクタ modint(ll x = 0){ val = x % MOD; if(val < 0) x += MOD; } // 入出力ストリーム friend constexpr istream &operator>>(istream &is, modint &x){ ll y; is >> y; x = y; return is; } friend constexpr ostream &operator<<(ostream &os, const modint &x){ return os << x.val; } // 算術演算子 modint operator -(){return modint(-val);} modint operator +(const modint &r) const { return modint(*this) += r; } modint operator -(const modint &r) const { return modint(*this) -= r; } modint operator *(const modint &r) const { return modint(*this) *= r; } modint operator /(const modint &r) const { return modint(*this) /= r; } // 代入演算子 modint &operator +=(const modint &r){ val += r.val; if(val >= MOD) val -= MOD; return *this; } modint &operator -=(const modint &r){ if(val < r.val) val += MOD; val -= r.val; return *this; } modint &operator *=(const modint &r){ val = val*r.val%MOD; if(val < 0) val += MOD; return *this; } modint &operator /=(const modint &r){ *this *= inv(r); return *this; } //等価比較演算子 bool operator ==(const modint& r){return this -> val == r.val;} bool operator !=(const modint& r){return this -> val != r.val;} bool operator <(const modint& r){return this -> val < r.val;} bool operator <=(const modint& r){return this -> val <= r.val;} bool operator >(const modint& r){return this -> val > r.val;} bool operator >=(const modint& r){return this -> val >= r.val;} // 累乗 static modint modpow(modint num, ll exp){ if(!exp) return modint(1); // 0乗 modint ret(1); modint tmp = num; while(exp){ if(exp&1) ret *= tmp; tmp *= tmp; exp >>= 1; } return ret; } // 逆元 static modint inv(modint num){ return modpow(num, MOD-2); } // 階乗 static modint factorial(ll n){ modint ret(1); if(n == 0) return ret; if((ll)factorial_vec.size() >= n) return factorial_vec[n-1]; ret = factorial(n-1)*n; factorial_vec.push_back(ret); return ret; } // コンビネーション static modint combination(ll n, ll r){ return factorial(n) / factorial(r) / factorial(n-r); } }; using mint = modint; template vector> modint::factorial_vec; ll gcd(ll a, ll b){ if(a%b == 0){ return b; }else{ return gcd(b, a%b); } } ll lcm(ll a, ll b){ return a*b / gcd(a, b); } ll powMod(ll x, ll n) { if (n == 0) return 1 % MOD; ll val = powMod(x, n / 2); val *= val; val %= MOD; if (n % 2 == 1) val *= x; return val % MOD; } int main() { ll n;cin>>n; vector tmp(5001),a; rep(i,0,n){ ll _;cin>>_; tmp[_]++; } rep(i,0,5001){ if(tmp[i]%2!=0){ a.push_back(i); } } n = a.size(); if(n==0){ cout << "Yes" << endl; return 0; } vector> dp(n+1,vector(8192,0)); dp[0][0] = 1; rep(i,0,n){ rep(j,0,8192){ dp[i+1][j] += dp[i][j] + dp[i][j^a[i]]; chmin(dp[i+1][j],10); } } if(dp[n][0]>3){ cout << "Yes" << endl; }else{ cout << "No" << endl; } return 0; }