#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, i, j, k, l;
  cin >> N;
  vector<int> a(N);
  for (i = 0; i < N; i++) {
    cin >> a.at(i);
  }
  int s1, s2;
  vector<int> b(N);
  bool ret = 1;
  string res = "Yes";
  int temp;
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      for (k = 0; k < N; k++) {
        if (i != j && k != i && k != j) {
          ret = (a.at(i) ^ a.at(j) == a.at(k));
          if (ret == 0) {
            res = "No";
            break;
          }
        }
      }
    }
  }
  cout << res << endl;
}
