#include <bits/stdc++.h>
using namespace std;
signed main() {
  int64_t N;
  cin >> N;
  vector<int64_t> v(N);
  for (int64_t i = (0); i < (N); i++) cin >> v[i];
  string ans = "No";
  if (N == 3) {
    if (v[0] == v[1] ^ v[2]) ans = "Yes";
  } else {
    int64_t s = 0;
    for (int64_t i = (0); i < (N); i++) s += v[i];
    if (s == 0) ans = "Yes";
  }
  cout << ans << endl;
  return 0;
}
