#include <bits/stdc++.h>
using namespace std;
int a[10050];
int main() {
  int n, k, i, m, j, count, x, ans, sum;
  scanf("%d%d", &n, &k);
  for (i = 0; i < k; i++) {
    scanf("%d", &a[i]);
  }
  count = n;
  for (i = 0; i < k; i++) {
    while (a[i] >= 4) {
      count--;
      a[i] -= 4;
    }
    if (count == 0) break;
  }
  m = n * 2 + count;
  for (i = 0; i < k; i++) {
    while (a[i] >= 2) {
      a[i] -= 2;
      m--;
    }
    if (m == 0) break;
  }
  x = count + m;
  for (i = 0; i < k; i++) {
    x -= a[i];
  }
  if (x >= 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
