#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const string YES = "Yes";
const string NO = "No";
string solve(ll N, vector<ll> a) {
  if (N % 3) return NO;
  vector<long> bit(30, 0);
  for (ll i = 0; i < N; ++i) {
    auto ai = bitset<30>(a[i]);
    for (ll j = 0; j < 30; ++j)
      if (ai[j]) bit[j]++;
  }
  for (ll j = 0; j < 30; ++j)
    if (bit[j] % 2) return NO;
  return YES;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll N;
  cin >> N;
  vector<ll> a(N);
  for (ll i = 0; i < N; ++i) cin >> a[i];
  cout << solve(N, move(a)) << endl;
  return 0;
}
