#include <bits/stdc++.h>
using namespace std;
int a[100005];
map<int, int> mp;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  if (n % 3 != 0)
    puts("No");
  else {
    int cnt = 0;
    for (int i = 1; i <= n; ++i) mp[a[i]]++;
    int A = 0, B = 0, C = 0;
    for (int i = 1; i <= n; ++i)
      if (mp.count(a[i])) {
        cnt += (mp[a[i]] == n / 3), mp[a[i]] = 0;
        if (cnt == 1) A = a[i];
        if (cnt == 2) B = a[i];
        if (cnt == 3) C = a[i];
      }
    if (cnt == 3 && (A ^ B) == C)
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
