#include <bits/stdc++.h>
using namespace std;
int n, k, a, z;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  int x = n, y = n * 2;
  for (int i = 1; i <= k; i++) {
    cin >> a;
    if (a >= 4) {
      int u = min(x, a / 4);
      x -= u;
      a -= 4 * u;
      if (a >= 4) {
        u = min(a / 2, y);
        y -= u;
        a -= 2 * u;
      }
      if (a > 3) {
        if (a <= z) {
          z -= a;
          continue;
        }
        cout << "NO";
        return 0;
      }
    }
    if (a == 3) {
      if (x) {
        x--;
        continue;
      }
      if (y >= 2) {
        y -= 2;
        continue;
      }
      if (z >= 3) {
        z -= 3;
        continue;
      }
      cout << "NO";
      return 0;
    }
    if (a == 2) {
      if (y) {
        y--;
        continue;
      }
      if (x) {
        x--;
        z++;
        continue;
      }
      if (z >= 2) {
        z -= 2;
        continue;
      }
      cout << "NO";
      return 0;
    }
    if (a == 1) {
      if (z) {
        z--;
        continue;
      }
      if (x) {
        y++;
        x--;
        continue;
      }
      if (y) {
        y--;
        continue;
      }
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
