#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e4 + 7;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int x;
  priority_queue<int> q;
  for (int i = 0; i < k; i++) {
    cin >> x;
    q.push(x);
  }
  int x1 = n, x2 = n * 2, x3 = 0;
  while (!q.empty()) {
    x = q.top();
    q.pop();
    int b;
    if (x >= 4) {
      b = x / 4;
      if (x1 >= b) {
        x1 -= b;
        if (x % 4) q.push(x % 4);
      } else {
        x -= x1 * 4;
        x1 = 0;
        x2 -= (x + 1) / 2;
      }
    } else if (x == 3) {
      if (x1)
        x1--;
      else
        x2 -= 2;
    } else if (x == 2) {
      if (x1) {
        x1--;
        x3++;
      } else if (x2)
        x2--;
      else
        x3 -= 2;
    } else {
      if (x3)
        x3--;
      else if (x2)
        x2--;
      else {
        x1--;
        x2++;
      }
    }
    if (x1 < 0 || x2 < 0 || x3 < 0) {
      printf("NO");
      return 0;
    }
  }
  printf("YES");
  return 0;
}
