#include <bits/stdc++.h>
using namespace std::literals::string_literals;
using i64 = long long;
using std::cout;
using std::endl;
using std::cin;

template<typename T>
std::vector<T> make_v(size_t a){return std::vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return std::vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

int main() {
	int n; scanf("%d", &n); std::vector<int> a(n);
	for(int i = 0; i < n; i++) scanf("%d", &a[i]);
	sort(begin(a), end(a));
	
	std::vector<int> latte = a;
	latte.erase(unique(begin(latte), end(latte)), end(latte));
	
	bool ans = true;
	if(latte.size() > 3) ans = false;
	if((latte[0] ^ latte[1] ^ latte[2]) != 0) ans = false;
	
	if(ans) printf("Yes\n");
	else printf("No\n");
	return 0;
}
