#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(k);
  int four = n, two = 2 * n;
  for (int i = 0; i < k; i++) {
    scanf("%d", &a[i]);
    int q = a[i] / 4;
    if (q <= four) {
      four -= q;
      a[i] -= 4 * q;
    } else {
      a[i] -= 4 * four;
      four = 0;
    }
    q = a[i] / 2;
    if (q <= two) {
      two -= q;
      a[i] -= 2 * q;
    } else {
      a[i] -= 2 * two;
      two = 0;
    }
  }
  queue<int> one, twos;
  for (int i = 0; i < k; i++)
    if (a[i]) {
      if (a[i] == 3 && four)
        a[i] = 0, four--;
      else if (a[i] == 2)
        twos.push(i);
      else if (a[i] == 1 && two)
        a[i] = 0, two--;
      else if (a[i] == 1)
        one.push(i);
    }
  while (four) {
    if (one.size() == 0 && twos.size() == 0) break;
    if (twos.size() && one.size()) {
      four--;
      a[twos.front()] = 0;
      twos.pop();
      a[one.front()] = 0;
      one.pop();
      if (one.size()) {
        a[one.front()] = 0;
        one.pop();
      }
    } else if (twos.size()) {
      if (twos.size() >= 3 && four >= 2) {
        int cnt = 3;
        while (cnt--) {
          a[twos.front()] = 0;
          twos.pop();
        }
        four -= 2;
      } else {
        four--;
        a[twos.front()] = 0;
        twos.pop();
      }
    } else if (one.size()) {
      if (one.size() >= 2) {
        int cnt = 0;
        while (cnt < 2 && one.size()) {
          a[one.front()] = 0;
          one.pop();
          cnt++;
        }
      } else {
        a[one.front()] = 0;
        one.pop();
      }
      four--;
    }
  }
  bool ok = true;
  for (int i = 0; i < k; i++)
    if (a[i]) ok = false;
  puts(ok ? "YES" : "NO");
  return 0;
}
