#include <bits/stdc++.h>
using namespace std;
long long a, b, c;
long long arr[10005];
bool cmp(long long p, long long q) { return p > q; }
int main() {
  long long n, grp;
  cin >> n >> grp;
  a = n, b = n, c = n;
  long long one = 0;
  for (int i = 0; i < grp; i++) {
    cin >> arr[i];
    long long four = arr[i] / 4;
    if (b >= four) {
      b -= four;
      arr[i] = arr[i] % 4;
    } else if (b > 0) {
      arr[i] -= (b * 4);
      b = 0;
    }
  }
  sort(arr, arr + grp, cmp);
  for (int i = 0; i < grp; i++) {
    if (arr[i] == 1 && one > 0) {
      one--;
      arr[i] = 0;
    } else if (arr[i] > 0 && arr[i] <= 2 && a > 0) {
      a--;
      arr[i] = 0;
    } else if (arr[i] > 0 && arr[i] <= 2 && c > 0) {
      c--;
      arr[i] = 0;
    } else if (arr[i] > 0 && arr[i] <= 2 && b > 0) {
      b--;
      if (arr[i] == 1)
        a++;
      else
        one++;
      arr[i] = 0;
    } else if (arr[i] > 0 && arr[i] <= 4 && b > 0) {
      b--;
      arr[i] = 0;
    }
  }
  long long tot = a + c;
  for (int i = 0; i < grp; i++) {
    long long need = arr[i] / 2;
    if (arr[i] % 2 == 1) need++;
    if (tot < need)
      break;
    else {
      arr[i] = 0;
      tot -= need;
    }
  }
  bool ck = true;
  for (int i = 0; i < grp; i++) {
    if (arr[i] > one)
      ck = false;
    else
      one -= arr[i];
  }
  if (ck)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
