#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    int val;
    cin >> val;
    m[val]++;
  }
  if (m.size() == 3) {
    int ans = 0, last = 0;
    for (auto e : m) {
      ans ^= e.first;
      if (!last) {
        last = e.second;
      } else if (e.second != last) {
        cout << "No";
        return 0;
      }
    }
    if (ans == 0) {
      cout << "Yes";
    } else {
      cout << "No";
    }
  } else {
    cout << "No";
  }
}
