#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> iv;
  int ta;
  int tw = 2 * n, fo = n, on = 0;
  for (int i = 0; i < k; i++) {
    cin >> ta;
    while (ta >= 4) {
      if (fo > 0) {
        fo--;
        ta -= 4;
      } else {
        tw -= 2;
        ta -= 4;
      }
    }
    if (ta == 2) {
      if (tw > 0) {
        tw--;
        ta = 0;
      } else {
        if (fo > 0) {
          fo--;
          on++;
          ta = 0;
        } else {
          iv.push_back(1);
          iv.push_back(1);
          continue;
        }
      }
    }
    iv.push_back(ta);
  }
  int sl = tw * 2 + fo * 4 + on;
  int cnt = 0;
  int si = iv.size();
  for (int i = 0; i < si; i++) {
    ta = iv[i];
    if (ta == 0) {
      continue;
    } else if (ta == 1) {
      if (on > 0) {
        sl--;
        on--;
      } else {
        cnt += (ta + 1);
      }
    } else if (ta == 3) {
      if (on >= 3) {
        sl -= 3;
        on -= 3;
      } else {
        cnt += (ta + 1);
      }
    }
  }
  if (cnt > sl) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
