#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using u32 = unsigned int;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int Inf = (1 << 30);
ll inf = (1LL << 60);
int main() {
  int n;
  cin >> n;
  int Xor = 0;
  bool zero = true;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    Xor ^= a;
    if (a != 0) zero = false;
  }
  if (n == 3 && Xor == 0 || zero)
    cout << "Yes";
  else
    cout << "No";
  return (0);
}
