#include <bits/stdc++.h>
using namespace std;
const int MaxK = 103;
int n, k;
int a[MaxK];
int s4, s2;
int main() {
  scanf("%d%d", &n, &k);
  s4 = n, s2 = 2 * n;
  for (int i = 1; i <= k; ++i) scanf("%d", a + i);
  for (int i = 1; i <= k; ++i) {
    int s = min(s4, a[i] / 4);
    s4 -= s, a[i] -= s * 4;
  }
  for (int i = 1; i <= k; ++i) {
    int s = min(s2, a[i] / 2);
    s2 -= s;
    a[i] -= s * 2;
    if (a[i] < 0) a[i] = 0;
  }
  for (int i = 1; i <= k; ++i)
    if (s4 && a[i] & 1) {
      s4--, s2++;
      a[i]--;
    }
  for (int i = 1; i <= k; ++i)
    while (s4 && a[i]) {
      s4--, s2++;
      a[i]--;
    }
  for (int i = 1; i <= k; ++i) {
    int s = min(s2, (a[i] + 1) / 2);
    s2 -= s;
    a[i] -= s * 2;
    if (a[i] < 0) a[i] = 0;
  }
  for (int i = 1; i <= k; ++i)
    if (a[i]) {
      printf("NO\n");
      return 0;
    }
  printf("YES\n");
  return 0;
}
