#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(k);
  for (int i = 0; i < k; i++) {
    cin >> a[i];
  }
  int fs = n;
  for (int i = 0; i < k; i++) {
    if (a[i] / 4 < fs) {
      fs -= a[i] / 4;
      a[i] %= 4;
    } else {
      a[i] -= fs * 4;
      fs = 0;
    }
    if (fs <= 0) break;
  }
  int ts = 2 * n;
  for (int i = 0; i < k; i++) {
    if (a[i] % 2 == 1 && fs > 0) {
      fs--;
      ts++;
      a[i]--;
    }
  }
  for (int i = 0; i < k; i++) {
    int tmp = (a[i] + 1) / 2;
    if (tmp < ts) {
      ts -= tmp;
      a[i] = 0;
    } else {
      a[i] = max(a[i] - 2 * ts, 0);
      ts = 0;
    }
  }
  int ff = fs / 2 * 6;
  fs = (fs % 2) * 2 + ff;
  for (int i = 0; i < k; i++) {
    fs -= a[i];
    if (fs < 0) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
