#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
const long long inf = 2147383647;
const long long mod = 1000000007;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  int n, flag = 0, x, cnt = 0, sum = 0;
  map<int, int> am;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (am.find(x) == am.end()) {
      cnt++;
      sum ^= x;
    }
    am[x]++;
  }
  string s;
  if (n % 3 == 0 && cnt == 3 && !sum)
    s = "Yes";
  else
    s = "No";
  cout << s << "\n";
  return 0;
}
