#include <bits/stdc++.h>
using namespace std;
int a[10004];
int main() {
  int n, k;
  cin >> n >> k;
  int db = 2 * n, qt = n, sng = 0;
  for (int i = 0; i < k; ++i) cin >> a[i];
  sort(a, a + k);
  reverse(a, a + k);
  for (int i = 0; i < k; ++i) {
    while (a[i] > 3 && qt > 0) {
      a[i] -= 4;
      qt--;
    }
  }
  sort(a, a + k);
  reverse(a, a + k);
  for (int i = 0; i < k; ++i) {
    while (db > 0 && a[i] > 1) {
      a[i] -= 2;
      db--;
    }
  }
  sort(a, a + k);
  reverse(a, a + k);
  for (int i = 0; i < k; ++i) {
    while (qt > 0 && a[i] > 1) {
      a[i] -= 2;
      qt--;
      sng++;
    }
  }
  sort(a, a + k);
  reverse(a, a + k);
  for (int i = 0; i < k; ++i) {
    while (qt > 0 && a[i] > 0) {
      a[i] -= 1;
      qt--;
      sng++;
    }
  }
  sort(a, a + k);
  reverse(a, a + k);
  for (int i = 0; i < k; ++i) {
    while (db > 0 && a[i] > 0) {
      a[i] -= 1;
      db--;
    }
  }
  sort(a, a + k);
  reverse(a, a + k);
  for (int i = 0; i < k; ++i) {
    while (sng > 0 && a[i] > 0) {
      a[i] -= 1;
      sng--;
    }
  }
  sort(a, a + k);
  reverse(a, a + k);
  if (sng >= 0 && db >= 0 && qt >= 0 && a[0] == 0)
    cout << "YES\n";
  else
    cout << "NO\n";
}
