#include "bits/stdc++.h"

int main() {
	int n;
	std::cin >> n;

	std::vector<int> a(n);
	for (auto &v : a) {
		std::cin >> v;
	}

	std::vector<int> dp = a;
	for (int i = 1; i < n; i++) {
		dp[i] = (dp[i - 1] ^ dp[i]);
	}

	std::cout << (dp.back() == 0 ? "Yes" : "No") << std::endl;
	return 0;
}
