#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, t;
  cin >> n >> k;
  int four = n, r1 = 0, r2 = 0;
  for (int i = 0; i < k; ++i) {
    cin >> t;
    int p = t / 4;
    if (four - p >= 0) {
      four -= p;
    } else {
      if (four > 0) {
        p -= four;
        four = 0;
      }
      r2 += p * 2;
    }
    if (t % 4 == 1) r1++;
    if (t % 4 == 2) r2++;
    if (t % 4 == 3) {
      r1++;
      r2++;
    }
  }
  if (four < r2) {
    r2 -= four;
  } else {
    r1 -= (four - r2);
    r2 = 0;
  }
  if (four < r1) {
    r1 -= four;
  } else {
    r2 -= (four - r1) / 2;
    r1 = 0;
  }
  if ((2 * n) >= (r1 + r2)) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
