#include <bits/stdc++.h>
template <typename T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
template <typename T>
T exp(T b, T p) {
  T x = 1;
  while (p) {
    if (p & 1) x = (x * b);
    b = (b * b);
    p = p >> 1;
  }
  return x;
}
template <typename T>
T mod_exp(T b, T p, T m) {
  T x = 1;
  while (p) {
    if (p & 1) x = (x * b) % m;
    b = (b * b) % m;
    p = p >> 1;
  }
  return x;
}
using namespace std;
long long n, k;
long long have[5], cnt[5];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  have[2] = 2 * n;
  have[4] = n;
  for (long long i = 0; i < k; i++) {
    int x;
    cin >> x;
    while (x >= 3) {
      if (have[4] > 0)
        x -= 4, have[4]--;
      else if (have[2] > 0)
        x -= 2, have[2]--;
    }
    if (x > 0) cnt[x]++;
  }
  while (cnt[2]) {
    if (have[2] > 0)
      cnt[2]--, have[2]--;
    else if (have[4] > 0)
      cnt[2]--, have[4]--, have[1]++;
    else
      cnt[2]--, cnt[1] += 2;
  }
  if (cnt[1] > have[1] + have[2] + have[4] * 2)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
