#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> cnt(30);
  for (int(i) = 0; (i) < (n); ++(i)) {
    int a;
    cin >> a;
    for (int(j) = 0; (j) < (30); ++(j)) {
      cnt[j] += a % 2;
      a /= 2;
    }
  }
  if (n == 3) {
    for (int(i) = 0; (i) < (30); ++(i)) {
      if (cnt[i] % 2 == 1) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
  } else {
    for (int(i) = 0; (i) < (30); ++(i)) {
      if (cnt[i] != 0) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
  }
}
