#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> a;
int main() {
  cin >> N;
  a.assign(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  if (N == 3) {
    if (a[0] ^ a[1] == a[2] && a[1] ^ a[2] == a[0] && a[2] ^ a[0] == a[1]) {
      cout << "Yes" << endl;
      return 0;
    } else {
      cout << "No" << endl;
      return 0;
    }
  } else {
    cout << "No" << endl;
    return 0;
  }
  return 0;
}
