#include <bits/stdc++.h>
using namespace std;
const int maxn = 2050;
int a[maxn];
int n, k;
bool mcmp(int x, int y) { return a[x] < a[y]; }
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> k;
  for (int i = 1; i < (k + 1); ++i) cin >> a[i];
  int mid_left = n;
  for (int i = 1; i <= k && mid_left; ++i) {
    int to_sit = min(mid_left, a[i] / 4);
    a[i] -= to_sit * 4;
    mid_left -= to_sit;
  }
  int ts_left = 2 * n;
  for (int i = 1; i <= k && ts_left; ++i) {
    int to_sit = min(ts_left, a[i] / 2);
    a[i] -= to_sit * 2;
    ts_left -= to_sit;
  }
  vector<int> tmp;
  for (int i = 1; i < (k + 1); ++i)
    if (a[i] >= 2) tmp.push_back(i);
  sort(tmp.begin(), tmp.end(), mcmp);
  int add = 0;
  for (int i = (int)tmp.size() - 1; i >= 0 && (mid_left > 0 || add > 0); --i) {
    int pos = tmp[i];
    ;
    if (a[pos] == 3) {
      if (!mid_left) {
        if (add >= 3)
          add -= 3, a[pos] = 0;
        else
          break;
      } else
        a[pos] = 0;
      mid_left--;
    }
    if (a[pos] == 2) {
      if (!mid_left) {
        if (add >= 2)
          add -= 2, a[pos] = 0;
        else
          break;
      } else {
        add++;
        a[pos] = 0;
        mid_left--;
      }
    }
    if (a[pos] == 1) {
      if (add)
        add--, a[pos] = 0;
      else if (mid_left) {
        add++;
        mid_left--;
        a[pos] = 0;
      } else
        break;
    }
  }
  tmp.clear();
  for (int i = 1; i < (k + 1); ++i)
    if (a[i]) tmp.push_back(i);
  sort(tmp.begin(), tmp.end(), mcmp);
  for (int i = (int)tmp.size() - 1; i >= 0 && (ts_left > 0); --i) {
    int pos = tmp[i];
    int to_sit = min(ts_left, (a[pos] + 1) / 2);
    a[pos] -= min(to_sit * 2, a[pos]);
    ts_left -= to_sit;
  }
  for (int i = (int)tmp.size() - 1; i >= 0 && (mid_left > 0 || add > 0); --i) {
    int pos = tmp[i];
    if (a[pos] == 3) {
      if (!mid_left) {
        if (add >= 3)
          add -= 3, a[pos] = 0;
        else
          break;
      } else
        a[pos] = 0;
      mid_left--;
    }
    if (a[pos] == 2) {
      if (!mid_left) {
        if (add >= 2)
          add -= 2, a[pos] = 0;
        else
          break;
      } else {
        add++;
        a[pos] = 0;
        mid_left--;
      }
    }
    if (a[pos] == 1) {
      if (add)
        add--, a[pos] = 0;
      else if (mid_left) {
        add++;
        mid_left--;
        a[pos] = 0;
      } else
        break;
    }
  }
  for (int i = 1; i < (k + 1); ++i) {
    if (a[i] > 0) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
