#include <bits/stdc++.h>
using namespace std;
int seat[5], arr[10000 + 5];
int main() {
  int n, k;
  cin >> n >> k;
  seat[4] = n;
  seat[2] = 2 * n;
  for (int i = 0; i < k; i++) cin >> arr[i];
  sort(arr, arr + k, [](int a, int b) { return a > b; });
  for (int i = 0; i < k; i++) {
    int qq = min(arr[i] / 4, seat[4]);
    arr[i] -= qq * 4;
    seat[4] -= qq;
  }
  sort(arr, arr + k, [](int a, int b) { return a > b; });
  for (int i = 0; i < k; i++) {
    int qq = min(arr[i] / 2, seat[2]);
    arr[i] -= qq * 2;
    seat[2] -= qq;
  }
  priority_queue<int> pq;
  for (int i = 0; i < k; i++) pq.push(arr[i]);
  while (!pq.empty()) {
    if (pq.top() <= 0) break;
    if (seat[4] > 0) {
      int x = pq.top();
      pq.pop();
      seat[4]--;
      if (x == 2)
        seat[1]++;
      else if (x == 1)
        seat[2]++;
      x -= min(x, 4);
      if (x > 0) pq.push(x);
    } else if (seat[2] > 0) {
      int x = pq.top();
      pq.pop();
      seat[2]--;
      x -= min(x, 2);
      if (x > 0) pq.push(x);
    } else if (seat[1] > 0) {
      int x = pq.top();
      pq.pop();
      seat[1]--;
      x -= min(x, 1);
      if (x > 0) pq.push(x);
    } else {
      break;
    }
  }
  cout << ((pq.empty() or pq.top() <= 0) ? "YES\n" : "NO\n");
  return 0;
}
