#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1000;
int n, a[maxn];
int main() {
while (~scanf("%d", &n)) {
int ans = 0;
bool flag = false;
for (int i = 1; i <= n; i++) {
scanf("%d", &a[i]);
ans ^= a[i];
if (a[i] > 1) flag = true;
}
if ((ans && flag) || (!ans && !flag)) printf("Yes\n");
else printf("No\n");
}
return 0;
}