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