#include <bits/stdc++.h>
using namespace std;
const long long inf = 2000000007LL;
const double EPS = 1e-10;
const long long inf_ll = (long long)1e18;
const long long maxn = 105LL;
const long long mod = 1000000009LL;
int n, k;
int a[maxn];
int main() {
  scanf("%d%d", &n, &k);
  int need[3] = {0, 0, 0};
  int supply[3] = {0, 2 * n, n};
  for (register int(i) = (1); (i) <= (k); ++i) {
    scanf("%d", a + i);
    need[2] += a[i] / 4;
    a[i] %= 4;
    need[1] += a[i] / 2;
    a[i] %= 2;
    need[0] += a[i];
  }
  if (need[2] <= supply[2]) {
    supply[2] -= need[2];
    supply[1] += supply[2];
    supply[0] += supply[2];
  } else {
    need[2] -= supply[2];
    need[1] += 2 * need[2];
  }
  if (need[1] <= supply[1]) {
    supply[1] -= need[1];
    supply[0] += supply[1];
  } else {
    need[1] -= supply[1];
    need[0] += 2 * need[1];
  }
  if (need[0] <= supply[0])
    puts("YES");
  else
    puts("NO");
  return 0;
}
