#include <bits/stdc++.h>
using namespace std;
int a[200];
multiset<pair<int, int> > s;
int main() {
  int n, k;
  cin >> n >> k;
  int twos = 2 * n, fs = n, lfs = 0, ch = 0, to = 0;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    if (fs >= 1) {
      int x = min(fs, a[i] / 4);
      fs -= x;
      a[i] -= 4 * x;
    }
    if (twos >= 1) {
      int x = min(twos, a[i] / 2);
      twos -= x;
      a[i] -= 2 * x;
    }
    if (a[i] == 1) {
      lfs++;
    } else if (a[i] == 3) {
      if (fs >= 1) {
        fs--;
      } else
        ch = 1;
    } else if (a[i] == 2) {
      to++;
    } else if (a[i] != 0)
      ch = 1;
  }
  if (to) {
    int ch = 0;
    while (to >= 1) {
      fs -= 1;
      to--;
      if (lfs == 0 && ch == 1) {
        to--;
        ch = 0;
      } else if (lfs == 0) {
        ch ^= 1;
      } else {
        lfs--;
      }
    }
    if (fs < 0) ch = 1;
  }
  if (ch || lfs > 2 * (fs) + twos) {
    cout << "NO\n";
  } else
    cout << "YES\n";
}
