#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  map<long long int, int> mp;
  long long int tmp = 0;
  for (int n = 2; n < N; n++) {
    long long int A;
    cin >> A;
    mp[A]++;
    tmp ^= A;
  }
  if (tmp) {
    cout << "No" << endl;
  } else {
    if (mp.size() > 3) {
      cout << "No" << endl;
    } else {
      bool flag = true;
      if (mp[0] == 0) {
        int cnt1 = mp.begin()->second;
        long long int num1 = mp.begin()->first;
        auto itr = mp.begin();
        itr++;
        int cnt2 = itr->second;
        long long int num2 = mp.begin()->first;
        itr++;
        int cnt3 = itr->second;
        long long int num3 = mp.begin()->first;
        if (cnt1 == cnt2 && cnt2 == cnt3) {
          if ((num1 ^ num2) == num3) {
            cout << "Yes" << endl;
          } else {
            cout << "No" << endl;
          }
        } else {
          cout << "No" << endl;
        }
      } else {
        if (mp.size() == 3) {
          cout << "No" << endl;
        } else {
          int cnt1 = mp.rbegin()->second;
          long long int num1 = mp.rbegin()->first;
          if (num1 == 0) {
            cout << "Yes" << endl;
          } else {
            if (cnt1 == mp.begin()->second * 2) {
              cout << "Yes" << endl;
            } else {
              cout << "No" << endl;
            }
          }
        }
      }
    }
  }
  return 0;
}
