#include <bits/stdc++.h>
using namespace std;
const int max_n = 100011, inf = 1000111222;
const long long inff = 1000111222333444;
int n, a[max_n], c[max_n];
map<int, int> mp;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    ++mp[a[i]];
  }
  if (n > 6 && n % 6 != 0) {
    cout << "No" << endl;
    return 0;
  }
  if (n % 6 == 0) {
    for (auto a : mp) {
      mp[a.first] /= n / 6;
    }
    n /= 6;
  }
  vector<int> b;
  for (auto a : mp) {
    for (int q = 0; q < a.second; ++q) {
      b.push_back(a.first);
    }
  }
  for (int i = 0; i < b.size(); ++i) {
    c[0] = b[i];
    for (int q = 0; q < b.size(); ++q) {
      if (i == q) continue;
      c[1] = b[q];
      for (int w = 1; w + 1 < n; ++w) {
        c[w + 1] = (w + 1) ^ c[w - 1];
      }
      if ((c[0] ^ c[n - 2]) == n && (c[1] ^ c[n - 1]) == 1) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
