#include <bits/stdc++.h>
using namespace std;
template <class T>
string to_s(const T& a) {
  ostringstream os;
  os << a;
  return os.str();
}
template <class T>
T to_T(const string& s) {
  istringstream is(s);
  T r;
  is >> r;
  return r;
}
bool A[10000][4];
int B[4], n, k;
int aa = -1, bb = -1, cc = -1, blk = 0;
bool allot(bool center, int x) {
  assert(x == 3 || x == 4);
  if (center) {
    if (bb >= n - 1) {
      return false;
    }
    for (long long i = (bb + 1); i < (long long)(n); i++) {
      assert(!A[i][1] && !A[i][2]);
      if (!A[i][1] && !A[i][2]) {
        A[i][1] = true;
        A[i][2] = true;
        bb++;
        blk += 2;
        return true;
      }
    }
    return false;
  }
  if (aa >= n - 1 && cc >= n - 1) return false;
  if (((aa >= n - 1) || (cc >= n - 1)) && x >= 3) return false;
  blk += 2;
  if (aa < n - 1) {
    A[++aa][0] = true;
  }
  if (cc < n - 1) {
    A[++cc][3] = true;
  }
  return true;
}
bool solve(int x) {
  bool res = true;
  if (!allot(true, x)) {
    res = allot(false, x);
    return res;
  }
  return true;
}
bool solve3or4(int x) {
  if (x == 0) return true;
  if (bb < n - 1) {
    int d = n - 1 - bb;
    d = min(d, x);
    x -= d;
    bb += d;
    if (x == 0) return true;
  }
  x *= 2;
  if (aa < n - 1) {
    int d = n - 1 - aa;
    d = min(d, x);
    x -= d;
    aa += d;
    if (x == 0) return true;
  }
  if (cc < n - 1) {
    int d = n - 1 - cc;
    d = min(d, x);
    x -= d;
    cc += d;
    if (x == 0) return true;
  }
  return false;
}
bool get_ans() {
  int c4 = B[0], c3 = B[1], c2 = B[2], c1 = B[3];
  if (!solve3or4(c4)) return false;
  if (!solve3or4(c3)) return false;
  blk = (c4 + c3) * 2;
  int a = n - 1 - aa, b = n - 1 - bb, c = n - 1 - cc;
  if (c2 > a + b + c) {
    c2 -= (a + b + c);
    blk += (a + b + c);
    c1 += 2 * c2;
  } else {
    blk += c2;
  }
  if (4 * n - blk < c1) return false;
  blk += c1;
  return true;
}
int main() {
  cin >> n >> k;
  bool res = true;
  for (long long i = (0); i < (long long)(k); i++) {
    int a;
    cin >> a;
    B[0] += a / 4;
    a %= 4;
    B[1] += a / 3;
    a %= 3;
    B[2] += a / 2;
    a %= 2;
    B[3] += a;
  }
  res = get_ans();
  cout << (res ? "YES" : "NO");
  return 0;
}
