#include <bits/stdc++.h>
int min(int x, int y) {
  if (x < y)
    return x;
  else
    return y;
}
int main() {
  int n, k;
  int n4 = 0, n2 = 0, n1 = 0;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < k; i++) {
    int tmp;
    scanf("%d", &tmp);
    n4 += tmp / 4;
    n2 += (tmp % 4) / 2;
    n1 += tmp % 2;
  }
  int left = 4 * n - (n4 * 2 + n1);
  if (n4 + n1 < n) {
    int tmp = n - n1 - n4;
    if (tmp % 2) tmp += 1;
    n2 -= tmp / 2;
    left -= tmp;
  }
  printf(left < n2 ? "NO\n" : "YES\n");
}
