#include <bits/stdc++.h>
using namespace std;
int main() {
  long long K, N;
  long long res2 = 0, res4 = 0, res1 = 0;
  scanf("%lld%lld", &K, &N);
  while (N--) {
    long long x;
    scanf("%lld", &x);
    if (x % 2 == 1) res1++, x--;
    res4 += x / 4;
    res2 += (x % 4) / 2;
  }
  long long cnt2 = 2 * K, cnt1 = 0;
  if (res4 > K) {
    res2 += (res4 - K) * 2;
  } else {
    cnt2 += (K - res4);
    cnt1 += (K - res4);
  }
  if (cnt2 >= res2) {
    cnt1 += (cnt2 - res2);
  } else {
    res1 += (res2 - cnt2) * 2;
  }
  if (cnt1 >= res1)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
