#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 2000000000;
const int INF2 = 10000000;
const double Micro = 1e-5;
int UnUsedVariable() {
  if (INF || Micro || MOD || INF2) {
    ;
  }
  return 0;
}
inline int isEven(int x) { return x % 2 == 0; }
inline int isOdd(int x) { return x % 2 == 1; }
int EintN(int array[], const int num) {
  for (int i = 0; i < num; i++) {
    printf("%d ", array[i]);
  }
  printf("\n");
  ;
  return 0;
}
int EintNN(const int heighth, const int width, int array[heighth][width]) {
  for (int i = (0); i < (heighth); i++) {
    for (int k = (0); k < (width); k++) {
      { printf("%d ", array[i][k]); }
    }
    printf("\n");
    ;
  }
  printf("\n");
  ;
  return 0;
}
int E(string str, const int num) {
  cerr << str << " is " << num << " now." << endl;
  return 0;
}
int experiment() {
  int ans;
  ans = 0;
  return 0;
}
int Ap() {
  int ans;
  ans = 0;
  int N;
  cin >> N;
  int a[N];
  for (int i = (0); i < (N); i++) {
    cin >> a[i];
  };
  int bitsumA = 0;
  for (int i = (0); i < (N); i++) {
    bitsumA = bitsumA ^ a[i];
  }
  if (bitsumA != 0) {
    {
      cout << ("No") << endl;
      return 0;
    };
  }
  if (N >= 4) {
    bool temp = true;
    for (int i = (0); i < (N); i++) {
      if (a[i] != 0) {
        temp = false;
      }
    }
    if (temp) {
      {
        cout << ("Yes") << endl;
        return 0;
      };
    } else {
      {
        cout << ("No") << endl;
        return 0;
      };
    }
  }
  if (N == 3) {
    if ((a[0] ^ a[1]) == a[2]) {
      {
        cout << ("Yes") << endl;
        return 0;
      };
    } else {
      {
        cout << ("No") << endl;
        return 0;
      };
    }
  }
  {
    cout << (0) << endl;
    return 0;
  };
  return 0;
}
int Bp() {
  int ans;
  ans = 0;
  return 0;
}
int Cp() {
  int ans;
  ans = 0;
  return 0;
}
int Dp() {
  int ans;
  ans = 0;
  return 0;
}
signed main() {
  Ap();
  return 0;
}
