#include <bits/stdc++.h>
using namespace std;
using pii = std::pair<int, int>;
using vpii = std::vector<pii>;
using vvpii = std::vector<vpii>;
using vi = std::vector<int>;
using vvi = std::vector<vi>;
using ll = long long;
using vll = std::vector<ll>;
using vvll = std::vector<vll>;
using pll = std::pair<ll, ll>;
using vpll = std::vector<pll>;
using vvpll = std::vector<vpll>;
int main() {
  int n, k;
  cin >> n >> k;
  vi as(k);
  for (int& ai : as) cin >> ai;
  int twos = 2 * n;
  int fours = n;
  int ones = 0;
  for (int& ai : as) {
    if (ai >= 3) {
      fours -= (ai + 1) / 4;
      ai = (ai % 4) % 3;
    }
    if (ai == 2) --twos;
    if (ai == 1) --ones;
  }
  if (fours < 0)
    twos += 2 * fours;
  else {
    twos += fours;
    ones += fours;
  }
  fours = 0;
  if (ones < 0) {
    twos += ones;
    ones = 0;
  }
  if (twos < 0) {
    ones += 2 * twos;
    twos = 0;
  }
  if (ones < 0 || twos < 0)
    cout << "NO\n";
  else
    cout << "YES\n";
}
