#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long res = 1;
  a = a % 998244353;
  while (b > 0) {
    if (b & 1) {
      res = (res * a) % 998244353;
      b--;
    }
    a = (a * a) % 998244353;
    b >>= 1;
  }
  return res;
}
long long fermat_inv(long long y) { return power(y, 998244353 - 2); }
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int a[k];
    for (int i = 0; i < k; i++) {
      cin >> a[i];
    }
    int ctr1 = n;
    int ctr2 = 2 * n;
    for (int i = 0; i < k && ctr1 > 0; i++) {
      int val = min(ctr1, a[i] / 4);
      ctr1 -= val;
      a[i] -= 4 * val;
    }
    for (int i = 0; i < k && ctr1 > 0; i++) {
      if (a[i] == 3) {
        ctr1--;
        a[i] -= 3;
      }
    }
    int val2 = 0;
    int val1 = 0;
    for (int i = 0; i < k; i++) {
      val1 += a[i] / 2;
      val2 += a[i] % 2;
    }
    int v1 = min(val1, ctr2);
    val1 -= v1;
    ctr2 -= v1;
    v1 = min(val2, ctr2);
    val2 -= v1;
    ctr2 -= v1;
    int v2 = 2 * ctr1;
    int v3 = min(ctr1, val1);
    v2 -= v3;
    val1 -= v3;
    val2 += 2 * val1;
    if (val2 <= v2)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
