#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  std::vector<int> can(k);
  for (int i = 0; i < k; i++) cin >> can[i];
  int r1, r2, r3;
  r1 = r2 = r3 = n;
  int t;
  for (int i = 0; i < k; i++) {
    if (can[i] < 4) continue;
    t = can[i] / 4;
    r1 -= t;
    if (r1 <= 0) {
      can[i] -= (r1 + t) * 4;
      break;
    }
    can[i] = can[i] % 4;
  }
  for (int i = 0; i < k; i++) {
    if (can[i] < 2) continue;
    t = can[i] / 2;
    r2 -= t;
    if (r2 <= 0) {
      can[i] -= (r2 + t) * 2;
      r2 = 0;
      break;
    }
    can[i] = can[i] % 2;
  }
  for (int i = 0; i < k; i++) {
    if (can[i] < 2) continue;
    t = can[i] / 2;
    r3 -= t;
    if (r3 <= 0) {
      can[i] -= (r3 + t) * 2;
      r3 = 0;
      break;
    }
    can[i] = can[i] % 2;
  }
  int x1 = 0, y2 = 0;
  if (r1 > 0) {
    for (int i = 0; i < k && r1 > 0; i++) {
      if (can[i] == 0) continue;
      r1--;
      if (can[i] == 3) {
        can[i] = 0;
      } else if (can[i] == 2) {
        x1++;
        can[i] = 0;
      } else if (can[i] == 1) {
        can[i] = 0;
        y2++;
      }
    }
  }
  if (y2 > 0) {
    for (int i = 0; i < k && y2 > 0; i++) {
      if (can[i] == 0) continue;
      if (can[i] == 2) {
        y2--;
        can[i] = 0;
      }
    }
  }
  x1 += r2 + r3 + y2;
  if (x1 > 0) {
    for (int i = 0; i < k && x1 > 0; i++) {
      if (can[i] == 0) continue;
      if (can[i] == 1) {
        x1--;
        can[i] = 0;
      } else if (can[i] == 2 && x1 >= 2) {
        x1 -= 2;
        can[i] = 0;
      } else if (can[i] == 3 && x1 >= 3) {
        x1 -= 3;
        can[i] = 0;
      }
    }
  }
  for (int i = 0; i < k; i++)
    if (can[i] != 0) {
      cout << "NO";
      return 0;
    }
  cout << "YES";
  return 0;
}
