#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inf = 1e18;
long long N;
long long a[100010];
int main() {
  cin >> N;
  if (N >= 4) {
    cout << ("No") << endl;
  } else {
    long long g = 0;
    for (long long i = (0); i < (N); i++) {
      cin >> a[i];
      g ^= a[i];
    }
    if (g == 0) {
      cout << ("Yes") << endl;
    }
  }
  return 0;
}
