#include <bits/stdc++.h>
using namespace std;
int a[10000];
signed main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < (k); i++) scanf("%d", &a[i]);
  int cnt = 0;
  bool flag = true;
  for (int i = 0; i < (k); i++) {
    int b = min(a[i] / 4, n - cnt);
    a[i] -= 4 * b;
    cnt += b;
    if (a[i] >= 4) {
      flag = false;
    }
  }
  if (flag) {
    sort(a, a + k, greater<int>());
    int d = 0;
    for (int i = 0; i < (k); i++) {
      if (a[i] == 1) {
        if (d) {
          d--;
          a[i] = 0;
        } else {
          if (cnt < n) {
            a[i] = 0;
            cnt++;
            d++;
          }
        }
      } else {
        if (cnt < n) {
          if (a[i] == 2) d++;
          cnt++;
          a[i] = 0;
        }
      }
    }
    sort(a, a + k, [](int a, int b) { return a % 2 < b % 2; });
    for (int i = 0; i < (k); i++) {
      if (d >= a[i]) {
        d -= a[i];
        a[i] = 0;
      } else {
        a[i] -= d;
        d = 0;
      }
    }
    int ans = 0;
    for (int i = 0; i < (k); i++) {
      ans += a[i] / 2 + a[i] % 2;
    }
    if (ans <= 2 * n) {
      puts("YES");
    } else {
      puts("NO");
    }
  } else {
    int ans = 0;
    for (int i = 0; i < (k); i++) {
      ans += a[i] / 2 + (a[i] % 2 > 0);
    }
    if (ans <= 2 * n) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
}
