#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double PI = 3.14159265358979323846;
int a[100];
int main() {
  if (1) {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
  }
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < k; ++i) {
    cin >> a[i];
  }
  int n4 = n, n2 = 2 * n, n1 = 0;
  for (int i = 0; i < k; ++i) {
    while (n4 && a[i] >= 4) {
      a[i] -= 4;
      --n4;
    }
  }
  while (n4) {
    ++n1;
    ++n2;
    --n4;
  }
  for (int i = 0; i < k; ++i) {
    while (n2 && a[i] >= 2) {
      a[i] -= 2;
      --n2;
    }
  }
  while (n2) {
    ++n1;
    --n2;
  }
  for (int i = 0; i < k; ++i) {
    while (n1 && a[i] > 0) {
      --n1;
      --a[i];
    }
  }
  bool works = true;
  for (int i = 0; i < k; ++i) {
    if (a[i] > 0) {
      works = false;
      break;
    }
  }
  if (works) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
