#include <bits/stdc++.h>
using namespace std;
int n, k, a[100], c, b, f, d;
int main() {
  cin >> n >> k;
  c = n;
  b = n * 2;
  sort(a, a + k, greater<int>());
  for (int i = 0; i < k; ++i) {
    cin >> a[i];
    f += a[i];
    while (a[i] >= 4 && c) {
      c--;
      a[i] -= 4;
      f -= 4;
    }
    while (a[i] >= 4 && b) {
      b--;
      a[i] -= 2;
      f -= 2;
    }
    while (a[i] == 2 && b) {
      b--;
      a[i] -= 2;
      f -= 2;
    }
  }
  for (int i = 0; i < k; ++i) {
    if (a[i] == 3 && c) {
      c--;
      a[i] -= 3;
      f -= 3;
    } else if (a[i] == 3 && b) {
      b--;
      a[i] -= 2;
      f -= 2;
    }
  }
  for (int i = 0; i < k; ++i)
    if (a[i] && b) {
      b--;
      f -= a[i];
      a[i] = 0;
    }
  for (int i = 0; i < k; ++i)
    if (a[i] == 2 && c) {
      c--;
      f -= a[i];
      a[i] = 0;
      d++;
    }
  for (int i = 0; i < k; ++i)
    if (d && a[i]) {
      d--;
      f -= 1;
      a[i]--;
    }
  for (int i = 0; i < k; ++i)
    if (a[i] && c) {
      c--;
      f -= a[i];
      a[i] = 0;
      d++;
    }
  for (int i = 0; i < k; ++i)
    if (d && a[i] == 1) {
      d--;
      f -= a[i];
      a[i] = 0;
    }
  if (f) return cout << "NO\n", 0;
  cout << "YES\n";
  return 0;
}
