#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-6;
const int inf = 1e9;
const long long llf = 1e18;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
int n, k;
int a[110];
int d[10010][10];
int top[10010];
map<int, int> f;
int len = 1;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
  }
  int cnt = 0;
  for (int i = 1; i <= k; i++) {
    while (a[i] >= 4) {
      a[i] -= 4;
      for (int j = 3; j <= 6; j++) d[len][j] = i;
      len++;
      if (len == n + 1) break;
    }
    if (len == n + 1) break;
  }
  len = 1;
  for (int i = 1; i <= k; i++) {
    while (a[i] >= 2) {
      while (d[len][1] && d[len][2] && d[len][3] && d[len][4] && d[len][7] &&
             d[len][8]) {
        len++;
      }
      if (len == n + 1) {
        break;
      }
      if (d[len][1] == 0 && d[len][2] == 0) {
        a[i] -= 2;
        d[len][1] = d[len][2] = i;
      } else if (d[len][7] == 0 && d[len][8] == 0) {
        a[i] -= 2;
        d[len][7] = d[len][8] = i;
      } else {
        a[i] -= 2;
        d[len][3] = d[len][4] = i;
      }
      if (len == n + 1) break;
    }
    if (len == n + 1) break;
  }
  len = 1;
  for (int i = 1; i <= n; i++) {
    int ret = 0;
    for (int j = 1; j <= 8; j++) {
      ret += (!d[i][j]);
    }
    ret /= 2;
    if (ret == 0) continue;
    for (int j = 1; j <= k; j++) {
      while (a[j]) {
        if (ret) {
          ret--;
          a[j]--;
        } else
          break;
      }
      if (ret == 0) break;
    }
  }
  int flag = 1;
  for (int i = 1; i <= k; i++) {
    if (a[i]) {
      flag = 0;
      break;
    }
  }
  if (!flag) {
    cout << "NO" << endl;
  } else
    cout << "YES" << endl;
  return 0;
}
