#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  int n;
  long long int x = 0, y, sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    x += a[i];
    if (i > 0) y = a[i - 1] ^ a[i], sum += y;
    if (i == n - 1) y = a[i] ^ a[0], sum += y;
  }
  if (sum == x)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
