#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll N;
  cin >> N;
  vector<ll> a(N);
  ll x1, x2, x3, x4;
  x1 = x2 = x3 = x4 = 0;
  ll c1, c2, c3, c4;
  c1 = c2 = c3 = c4 = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (a[i] > 0) {
      if (x1 == 0) {
        x1 = a[i];
      } else if (x2 == 0) {
        x2 = a[i];
      } else if (x3 == 0) {
        x3 = a[i];
      } else if (x4 == 0) {
        x4 = a[i];
      }
      if (x1 == a[i]) c1++;
      if (x2 == a[i]) c2++;
      if (x3 == a[i]) c3++;
    }
  }
  if (x1 == 0) {
    cout << "Yes\n";
  } else if (x3 == 0 && c1 == c2) {
    cout << "Yes\n";
  } else if (x4 == 0 && c1 == c2 && c2 == c3 && x1 ^ x2 ^ x3 == 0) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  return 0;
}
