#include <bits/stdc++.h>
int a[101];
int main() {
  int i, l, t, n, k, c4, c2, c1;
  bool z;
  scanf("%d%d", &n, &k);
  c4 = n;
  c2 = n << 1;
  z = true;
  c1 = 0;
  for (i = 1; i <= k; i++) scanf("%d", &a[i]);
  for (i = 1; i <= k; i++) {
    if (c4) {
      if (c4 >= a[i] >> 2) {
        c4 -= a[i] >> 2;
        a[i] %= 4;
        switch (a[i]) {
          case 1:
            if (c1 >= 1)
              c1--;
            else if (c4 >= 1)
              c4--, c2++;
            else if (c2 >= 1)
              c2--;
            else
              z = false;
            break;
          case 3:
            if (c4 >= 1)
              c4--;
            else if (c2 >= 2)
              c2 -= 2;
            else if (c1 >= 3)
              c1 -= 3;
            else
              z = false;
            break;
          case 2:
            if (c2 >= 1)
              c2--;
            else if (c4 >= 1)
              c4--, c1++;
            else if (c1 >= 2)
              c1 -= 2;
            else
              z = false;
            break;
        }
        if (!z) break;
      } else {
        a[i] -= c4 << 2;
        c4 = 0;
        if (c2 >= a[i] >> 1)
          c2 -= a[i] >> 1;
        else {
          a[i] -= c2 * 2;
          c2 = 0;
          if (c1 >= a[i])
            c1 -= 2, a[i] = 0;
          else {
            z = false;
            break;
          }
        }
        if (a[i] & 1) {
          if (c1 >= 1)
            c1--;
          else if (c2 >= 1)
            c2--;
          else {
            z = false;
            break;
          }
        }
      }
    } else {
      if (c2 >= a[i] >> 1)
        c2 -= a[i] >> 1;
      else {
        a[i] -= c2 * 2;
        c2 = 0;
        if (c1 >= a[i])
          c1 -= a[i], a[i] = 0;
        else {
          z = false;
          break;
        }
      }
      if (a[i] & 1) {
        if (c1 >= 1)
          c1--;
        else if (c2 >= 1)
          c2--;
        else {
          z = false;
          break;
        }
      }
    }
  }
  if (z)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
