#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k, i, n4, n2, x, n1;
  cin >> n >> k;
  int a[k];
  for (i = 0; i < k; i++) cin >> a[i];
  n4 = n;
  n2 = 2 * n;
  n1 = 0;
  for (i = 0; i < k; i++) {
    x = a[i] / 4;
    if (n4 >= x)
      n4 -= x;
    else {
      x -= n4;
      n4 = 0;
      if (x * 2 <= n2)
        n2 -= x * 2;
      else if (x * 4 <= n1)
        n1 -= x * 4;
      else
        break;
    }
    x = a[i] % 4;
    if (x == 0) continue;
    if (x == 1) {
      if (n1 > 0)
        n1--;
      else if (n4 > 0) {
        n4--;
        n2++;
      } else if (n2 > 0)
        n2--;
      else
        break;
    }
    if (x == 2) {
      if (n2 > 0)
        n2--;
      else if (n4 > 0) {
        n4--;
        n1++;
      } else if (n1 > 1)
        n1 -= 2;
      else
        break;
    }
    if (x == 3) {
      if (n4 > 0)
        n4--;
      else if (n2 > 1)
        n2 -= 2;
      else if (n1 > 2)
        n1 -= 3;
      else
        break;
    }
  }
  if (i == k)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
