#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  vector<int> a(k);
  for (int i = 0; i < k; ++i) scanf("%d", &a[i]);
  int p4 = n;
  int p2 = 2 * n;
  int p1 = 0;
  for (int i = 0; i < k; ++i) {
    while (a[i] >= 4 && p4 > 0) {
      a[i] -= 4;
      p4--;
    }
  }
  p2 += p4;
  p1 += p4;
  for (int i = 0; i < k; ++i) {
    while (a[i] >= 2 && p2 > 0) {
      a[i] -= 2;
      p2--;
    }
  }
  p1 += p2;
  for (int i = 0; i < k; ++i) {
    while (a[i] > 0 && p1 > 0) {
      a[i]--;
      p1--;
    }
  }
  bool ans = true;
  for (int i = 0; i < k; ++i)
    if (a[i] > 0) ans = false;
  if (ans)
    printf("YES\n");
  else
    printf("NO\n");
}
