#include <bits/stdc++.h>
std::map<int, int> mp;
int n, tot, sum[100100], x, a[300100];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (!mp[x]) a[++tot] = x, mp[x] = tot;
    sum[mp[x]]++;
  }
  if (tot != 3) return puts("No"), 0;
  if (sum[1] != sum[2] || sum[1] != sum[3] || sum[2] != sum[3])
    return puts("No"), 0;
  if ((a[1] ^ a[2] ^ a[3]) != 0) return puts("No"), 0;
  puts("Yes");
}
