#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n;
int a[MAXN];
int main() {
  scanf("%d", &n);
  bool allzero = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    allzero &= !a[i];
  }
  if (allzero)
    puts("Yes");
  else if (n % 3 != 0)
    puts("No");
  else {
    sort(a + 1, a + n + 1);
    int N = n;
    n = unique(a + 1, a + n + 1) - a - 1;
    if (n != 3 && n != 2)
      puts("No");
    else if (n == 2) {
      int cnt[3] = {0};
      for (int i = 1; i <= N; i++)
        for (int j = 1; j <= 2; j++)
          if (a[i] == a[j]) cnt[j]++;
      if (a[1])
        puts("No");
      else if (cnt[2] != cnt[1] * 2)
        puts("No");
      else
        puts("Yes");
    } else {
      int cnt[4] = {0};
      for (int i = 1; i <= N; i++)
        for (int j = 1; j <= 3; j++)
          if (a[i] == a[j]) cnt[j]++;
      if (a[1] ^ a[2] ^ a[3])
        puts("No");
      else if (cnt[1] != cnt[2] || cnt[2] != cnt[3] || cnt[1] != cnt[3])
        puts("No");
      else
        puts("Yes");
    }
  }
  return 0;
}
