#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
template <class T>
using V = vector<T>;
template <class T>
using VV = vector<V<T>>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const double PI = acos(-1), EPS = 1e-10;
const ll MOD = 1E9 + 7;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
template <class T>
istream &operator>>(istream &is, vector<T> &st) {
  for (size_t i = 0; i < st.size(); ++i) is >> st[i];
  return is;
}
template <class T>
istream &operator>>(istream &is, vector<vector<T>> &st) {
  for (size_t i = 0; i < st.size(); ++i) is >> st[i];
  return is;
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &st) {
  for (size_t i = 0; i < st.size(); ++i) {
    if (i == st.size() - 1)
      os << st[i];
    else
      os << st[i] << " ";
  }
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const vector<vector<T>> &st) {
  for (size_t i = 0; i < st.size(); ++i) {
    os << st[i];
    if (i != st.size() - 1) os << endl;
  }
  return os;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  int n;
  cin >> n;
  vi a(n);
  cin >> a;
  if (n == 3) {
    if ((a[0] ^ a[1]) == a[2])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    if (a == vi(n, 0))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
