#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, k, v[maxn], ans;
bool solve() {
  int num1 = 0, num2 = n * 2, num4 = n;
  for (int i = 0; i < k; i++) {
    if (num4 >= v[i] / 4)
      num4 -= v[i] / 4;
    else {
      int left = v[i] / 4 - num4;
      num4 = 0;
      if (num2 >= left * 2)
        num2 -= left * 2;
      else
        return false;
    }
    v[i] %= 4;
  }
  for (int i = 0; i < k; i++) {
    if (v[i] == 1) {
      if (num1 > 0)
        num1--;
      else if (num4 > 0) {
        num4--;
        num2++;
      } else if (num2 > 0)
        num2--;
      else
        return false;
    } else if (v[i] == 2) {
      if (num2 > 0)
        num2--;
      else if (num4 > 0) {
        num4--;
        num1++;
      } else if (num1 >= 2)
        num1 -= 2;
      else
        return false;
    } else if (v[i] == 3) {
      if (num1 > 0 && num2 > 0) {
        num1--;
        num2--;
      } else if (num1 >= 3)
        num1 -= 3;
      else if (num4 > 0)
        num4--;
      else if (num2 >= 2)
        num2 -= 2;
      else
        return false;
    }
  }
  return true;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    cin >> v[i];
    ans += v[i];
  }
  if (solve())
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
