#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int main() {
  cin.tie(NULL);
  ios::sync_with_stdio(false);
  int n, i, j, k;
  cin >> n >> k;
  int arr[k];
  for (i = 0; i < k; i++) cin >> arr[i];
  int a4 = n;
  int a2 = n * 2;
  int rem[4] = {0, 0, 0, 0};
  for (i = 0; i < k; i++) {
    while (arr[i] >= 3 && a4 > 0) {
      a4--;
      arr[i] -= 4;
    }
    while (arr[i] >= 2 && a2 > 0) {
      a2--;
      arr[i] -= 2;
    }
    if (arr[i] > 0 && a2 == 0 && a4 == 0) {
      cout << "NO";
      return 0;
    }
    if (arr[i] > 0) rem[arr[i]]++;
  }
  int a1 = 0;
  while (rem[2] > 0 && a4 > 0) {
    rem[2]--;
    a4--;
    a1++;
  }
  while (rem[2] > 0) {
    rem[2]--;
    rem[1] += 2;
  }
  if (rem[1] > a1 + a2 + 2 * a4)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
