#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  if (n % 3 == 0) {
    int s = 0;
    for (int i = 0; i < n; i++) {
      int j;
      cin >> j;
      s ^= j;
    }
    if (s == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else
    cout << "No" << endl;
}
