#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (N); i++) cin >> A[i];
  long long tmp = 0;
  for (int i = 0; i < (N); i++) tmp += A[i];
  if (tmp == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  long long cnt[3] = {0, 0, 0};
  for (int i = 0; i < (N); i++) {
    if (A[i] == 0 || A[i] > 3) {
      cout << "No" << endl;
      return 0;
    }
    cnt[A[i] - 1]++;
  }
  if (cnt[0] == cnt[1] && cnt[1] == cnt[2])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
