#include <bits/stdc++.h>
using namespace std;
int n, x;
int nr1, f1, nr2, f2, nr3, f3;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (nr1 == 0) {
      nr1 = x;
      f1++;
    } else if (nr1 == x)
      f1++;
    else if (nr2 == 0) {
      nr2 = x;
      f2++;
    } else if (nr2 == x) {
      f2++;
    } else if (nr3 == 0) {
      nr3 = x;
      f3++;
    } else if (nr3 == x)
      f3++;
    else {
      cout << "No";
      return 0;
    }
  }
  if (nr1 ^ nr2 == nr3 && f1 == f2 == f3)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
