#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector;
using vll = vector;
void solve()
{
ull n;
cin >> n;
vector a(n);
map<ull, ull> mp;
for (ull i = 0; i < n; i++) {
cin >> a[i];
mp[a[i]]++;
}
if (n >= 130) {
cout << "Yes\n";
return;
}
for (ull i = 0; i < n; i++) {
for (ull j = i + 1; j < n; j++) {
for (ull k = j + 1; k < n; k++) {
ull num = a[i] ^ a[j] ^ a[k];
ull cnt = mp[num];
if (num == a[i]) {
cnt--;
}
if (num == a[j]) {
cnt--;
}
if (num == a[k]) {
cnt--;
}
if (cnt > 0) {
cout << "Yes\n";
return;
}
}
}
}
cout << "No\n";
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
solve();
return 0;
}