#include <bits/stdc++.h>
using namespace std;
const int INF = 1.01e9;
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    vector<int> a(n);
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    map<int, int> mp;
    for (int x : a) mp[x]++;
    vector<pair<int, int>> b;
    for (auto it : mp) b.push_back(it);
    bool ok = b.size() == 3 && b[0].second == b[1].second &&
              b[0].second == b[2].second &&
              (b[0].first ^ b[1].first ^ b[2].first) == 0;
    ok |= b.size() == 1 && b[0].first == 0;
    cout << (ok ? "Yes" : "No") << endl;
  }
}
