#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long int n;
  cin >> n;
  long long int a[n];
  long long int ans = 0;
  long long int ans1 = 0;
  long long int ans2 = 0;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (x % 2 != 0 && x % 4 != 0)
      ans++;
    else if (x % 4 == 0)
      ans1++;
    else if (x % 2 == 0)
      ans2++;
  }
  cout << ans1 << " " << ans << " " << ans2 << endl;
  if (ans == 0 || ans1 && !ans || ans2 && !ans ||
      (!ans2 && ans1 >= (ans - 1)) || (ans2 && ans1 >= ans))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
