#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long a[k + 1];
  for (long long i = 0; i < k; i++) {
    cin >> a[i];
  }
  long long c4 = n, c2 = 2 * n;
  long long o1 = 0;
  for (long long i = 0; i < k; i++) {
    while (c4 > 0 && a[i] > 3) {
      c4 -= 1;
      a[i] -= 4;
    }
    while (c2 >= 2 && a[i] > 3) {
      c2 -= 2;
      a[i] -= 4;
    }
    if (a[i] >= 3) {
      while (c4 > 0 && a[i] > 0) {
        c4 -= 1;
        a[i] -= 3;
      }
      while (c2 >= 2 && a[i] > 0) {
        c2 -= 2;
        a[i] -= 3;
      }
    }
    if (a[i] >= 2) {
      while (c2 > 0 && a[i] > 0) {
        c2 -= 1;
        a[i] -= 2;
      }
      while (c4 > 0 && a[i] > 0) {
        c4 -= 1;
        o1++;
        a[i] -= 2;
      }
    }
    if (a[i] > 0) {
      while (o1 > 0 && a[i] > 0) {
        o1--;
        a[i]--;
      }
      while (c4 > 0 && a[i] > 0) {
        c4 -= 1;
        a[i] -= 1;
        c2++;
      }
      while (a[i] > 0 && c2 > 0) {
        c2 -= 1;
        a[i] -= 1;
      }
    }
    if (a[i] > 0) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
