#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int a[N];
int main(void) {
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < k; i++) scanf("%d", a + i);
  int m = n;
  for (int i = 0; i < k; i++) {
    while (m and a[i] >= 4) {
      a[i] -= 4;
      m--;
    }
  }
  for (int i = 0; i < k; i++) {
    while (m and a[i] > 2) {
      a[i] = 0;
      m--;
    }
  }
  int x = n * 2;
  for (int i = 0; i < k; i++) {
    while (x and a[i] >= 2) {
      a[i] -= 2;
      x--;
    }
  }
  for (int i = 0; i < k; i++) {
    while (x and a[i] > 0) {
      a[i] -= 2;
      a[i] = max(a[i], 0);
      x--;
    }
  }
  while (m) {
    bool flag = false;
    for (int i = 0; i < k; i++)
      if (a[i] == 2) {
        a[i] = 0, flag = true;
        break;
      }
    if (!flag)
      for (int i = 0; i < k; i++)
        if (a[i] == 1) {
          a[i] = 0, flag = true;
          break;
        }
    flag = false;
    for (int i = 0; i < k; i++)
      if (a[i] == 1) {
        a[i] = 0, flag = true;
        break;
      }
    if (!flag)
      for (int i = 0; i < k; i++)
        if (a[i] == 2) {
          a[i] = 1, flag = true;
          break;
        }
    if (!flag) break;
    m--;
  }
  for (int i = 0; i < k; i++) {
    if (a[i]) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
