#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e2 + 10;
const int INF = 0x7fffffff;
const int MOD = 1000007;
int a[MAXN];
void solve() {
  int n, k;
  scanf("%d%d", &n, &k);
  int cnt4 = 0, cnt2 = 0, cnt1 = 0;
  for (int i = 0; i < k; i++) {
    scanf("%d", &a[i]);
    cnt4 += a[i] / 4;
    if (a[i] % 4 == 1)
      cnt1++;
    else if (a[i] % 4 == 2)
      cnt2++;
    else if (a[i] % 4 == 3) {
      cnt1++;
      cnt2++;
    }
  }
  while (cnt4 > (cnt1 + cnt2 + 1) / 2) {
    cnt4--;
    cnt2 += 2;
  }
  while ((cnt2 + cnt1 + 1) / 2 > cnt4) {
    if (cnt2 && cnt1) {
      cnt2--;
      cnt1--;
      cnt4++;
    } else if (cnt1 && !cnt2) {
      cnt1 -= 2;
      cnt4++;
    } else if (cnt2 && !cnt1) {
      cnt2--;
      cnt1 += 2;
    }
  }
  if (n * 2 >= (cnt1 + cnt2) && n >= cnt4)
    printf("YES");
  else
    printf("NO");
}
int main() {
  solve();
  return 0;
}
