#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
const ll mod = 1000000007;
const ll INF = 1000000099;
signed main() {
  ll n;
  cin >> n;
  bool ans = true;
  vector<ll> a(n);
  for (ll i = 0; i < (ll)(n); i++) {
    cin >> a[i];
    if (a[i] != 0) ans = false;
  }
  if (n == 3) {
    if (a[0] ^ a[1] == a[2])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    if (ans)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
