#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inf = 1e18;
long long N;
long long a[100010];
map<long long, long long> mp;
int main() {
  cin >> N;
  long long g = 0;
  long long zero = 0;
  for (long long i = (0); i < (N); i++) {
    cin >> a[i];
    g ^= a[i];
    mp[a[i]]++;
    if (a[i] == 0) {
      zero = 1;
    }
  }
  if (mp.size() == 3 && g == 0) {
    long long tmp = -1;
    for (auto m : mp) {
      if (tmp == -1) {
        tmp = m.second;
      } else if (m.second != tmp) {
        tmp = -2;
      }
    }
    if (tmp == -2)
      cout << ("No") << endl;
    else
      cout << ("Yes") << endl;
  } else if (zero && mp.size() == 2 && g == 0) {
    long long a, b;
    for (auto m : mp) {
      if (m.first == 0) {
        a = m.second;
      } else {
        b = m.second;
      }
    }
    if (b != a * 2)
      cout << ("No") << endl;
    else
      cout << ("Yes") << endl;
  } else {
    cout << ("No") << endl;
  }
  return 0;
}
