#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int k, n, a[maxn];
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= k; i++) scanf("%d", &a[i]);
  sort(a + 1, a + k + 1);
  int flag = 0;
  for (int i = 0; i <= k; i++) {
    int one = i, two = (2 * n + i), four = n - i;
    int cnt = 0;
    for (int j = k; j >= 1; j--) {
      int v = a[j];
      int x = v / 4;
      if (four >= x) {
        v -= 4 * x;
        four -= x;
      } else {
        v -= four * 4;
        four = 0;
      }
      if (v <= 0) {
        cnt++;
        continue;
      }
      x = v / 2;
      if (two >= x) {
        v -= 2 * x;
        two -= x;
      } else {
        v -= two * 2;
        two = 0;
      }
      if (v <= 0) {
        cnt++;
        continue;
      }
      if (one >= v) {
        one -= v;
        v = 0;
      } else {
        v -= one;
        one = 0;
      }
      if (two >= v) {
        two -= v;
        v = 0;
      }
      if (v <= 0) {
        cnt++;
        continue;
      }
    }
    if (cnt == k) {
      flag = 1;
      break;
    }
  }
  if (flag == 1)
    puts("YES");
  else
    puts("NO");
  return 0;
}
