#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110000;
const int MOD = 1000000007;
const int INF = 2000000000;
const double PI = 3.14159265358979;
const int dir_4r[] = {-1, 1, 0, 0};
const int dir_4c[] = {0, 0, -1, 1};
const int dir_8r[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dir_8c[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int n, k, a;
int one;
int two;
int four;
int main() {
  scanf("%d%d", &n, &k);
  one = 0;
  two = 2 * n;
  four = n;
  bool ok = true;
  for (int i = 0; i < k; ++i) {
    scanf("%d", &a);
    if (ok) {
      int nf = a / 4;
      a -= 4 * nf;
      int nt = a / 2;
      a -= 2 * nt;
      if (a) {
        if (one)
          one--;
        else if (four) {
          four--;
          two++;
        } else if (two)
          two--;
        else {
          ok = false;
          continue;
        }
      }
      if (four >= nf) {
        four -= nf;
        nf = 0;
      } else {
        nf -= four;
        four = 0;
      }
      nt += 2 * nf;
      if (two >= nt) {
        two -= nt;
        nt = 0;
      } else {
        nt -= two;
        two = 0;
      }
      if (nt && four) {
        four--;
        one++;
        nt = 0;
      }
      int no = 2 * nt;
      if (one >= no) {
        one -= no;
        no = 0;
      } else {
        no -= one;
        one = 0;
      }
      if (four * 2 >= no) {
        four -= no / 2;
        no = 0;
      } else {
        no -= 2 * four;
        four = 0;
      }
      if (two >= no) {
        two -= no;
        no = 0;
      } else
        ok = false;
    }
  }
  if (ok)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
