#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int n;
int a[N], c[N];
int main() {
  scanf("%d", &n);
  if (n % 3) {
    printf("No");
    return 0;
  }
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  c[0] = 1;
  for (int i = 1; i <= n; i++)
    if (a[c[0]] != a[i])
      a[++c[0]] = a[i], c[c[0]] = 1;
    else
      c[c[0]]++;
  if (c[0] != 3) {
    printf("No");
    return 0;
  }
  if (c[1] != c[2] || c[2] != c[3] || c[1] != c[3]) {
    printf("No");
    return 0;
  }
  printf("Yes");
  return 0;
}
