#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int arr[n];
  int x = 0;
  set<int> s;
  unordered_map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    x ^= arr[i];
    mp[arr[i]]++;
    s.insert(arr[i]);
  }
  if (x != 0 || s.size() != 3) {
    cout << "No"
         << "\n";
    return;
  }
  int t = -1;
  for (auto i : mp) {
    if (t == -1) t = i.second;
    if (i.second != t) {
      cout << "No"
           << "\n";
      return;
    }
  }
  cout << "Yes"
       << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) solve();
  ;
  return 0;
}
