#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  vector<long> a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long _a;
    cin >> _a;
    a.push_back(_a);
  }
  int flag = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > 0) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n == 3) {
    long x = a[0] ^ a[1];
    long y = a[1] ^ a[2];
    long z = a[2] ^ a[0];
    if ((x == a[2]) && (y = a[0]) && (z = a[1])) {
      cout << "Yes" << endl;
      return 0;
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  if (n % 2 == 0) {
    long x = a[0];
    long y = 0;
    for (int i = 1; i < n; i++) {
      if (a[i] != a[0]) {
        y = a[i];
      }
    }
    long z = x ^ y;
    if ((x + y) != z) {
      cout << "No" << endl;
    } else {
      int cnt_x = 0;
      int cnt_y = 0;
      for (int i = 0; i < n; i++) {
        if (a[i] == x) cnt_x++;
        if (a[i] == y) cnt_y++;
      }
      if ((cnt_x == (n / 2)) & (cnt_y == (n / 2))) {
        cout << "Yes" << endl;
        return 0;
      } else {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
