#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 3) {
    if (a[2] == (a[0] ^ a[1])) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    bool ok = true;
    for (int i = 0; i < n; i++)
      if (a[i] != 0) ok = false;
    if (ok)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
