#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
int s[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= (k); ++i) cin >> s[i];
  int a = n, b = 2 * n;
  for (int i = 1; i <= (k); ++i) {
    while (a > 0 && s[i] >= 4) {
      s[i] -= 4;
      a--;
    }
    while (a > 0 && s[i] >= 3) {
      s[i] -= 3;
      a--;
    }
    while (b > 0 && s[i] >= 2) {
      s[i] -= 2;
      b--;
    }
  }
  sort(s + 1, s + 1 + k);
  int l = 1, r = k;
  while (!s[l]) l++;
  while (a > 0 && l < r) {
    if (s[l] == 1) {
      s[l] = 0;
      s[r] = 0;
      l++, r--, a--;
    } else
      break;
  }
  for (int i = l; i <= r; i++) {
    if (a >= 2 && s[i] == 2) s[i] = 0, a -= 2, b += 2;
  }
  b += a;
  for (int i = 1; i <= (k); ++i)
    if (b > 0 && s[i] > 0) b--, s[i] = 0;
  int f = 0;
  for (int i = 1; i <= (k); ++i)
    if (s[i]) f = 1;
  cout << (f ? "NO" : "YES") << endl;
  return 0;
}
