#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[10008];
int cnt2;
int cnt4;
int cnt1;
int main() {
  scanf("%d", &n);
  scanf("%d", &k);
  for (int i = 0; i < k; i++) {
    scanf("%d", a + i);
  }
  cnt2 = n * 2;
  cnt4 = n;
  cnt1 = 0;
  for (int i = 0; i < k; i++) {
    while (a[i] >= 4) {
      a[i] -= 4;
      if (cnt4) {
        cnt4--;
      } else if (cnt2 >= 2) {
        cnt2 -= 2;
      } else {
        a[i] += 4;
        break;
      }
    }
  }
  for (int i = 0; i < k; i++) {
    while (a[i] >= 3) {
      a[i] -= 3;
      if (cnt4) {
        cnt4--;
      } else if (cnt2 >= 2) {
        cnt2 -= 2;
      } else {
        a[i] += 3;
        break;
      }
    }
  }
  for (int i = 0; i < k; i++) {
    while (a[i] >= 2) {
      a[i] -= 2;
      if (cnt4) {
        cnt4--;
        cnt1++;
      } else if (cnt2) {
        cnt2--;
      } else {
        a[i] += 2;
        break;
      }
    }
  }
  for (int i = 0; i < k; i++) {
    while (a[i] >= 1) {
      a[i] -= 1;
      if (cnt4) {
        cnt4--;
        cnt1++;
      } else if (cnt2) {
        cnt2--;
      } else if (cnt1) {
        cnt1--;
      } else {
        puts("NO"), exit(0);
      }
    }
  }
  puts("YES");
}
