#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const int MAX = 510000;
const long long MOD = 1000000007;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = (0); i < (n); ++i) cin >> a[i];
  if (n != 3) {
    cout << "No" << endl;
    return 0;
  }
  long long b = a[0] ^ a[1], c = a[0] ^ a[2], d = a[1] ^ a[2];
  if (b != a[2] || c != a[1] || d != a[0]) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
}
