#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e4 + 3;
const long long MOD = 998244353;
int a[MAX];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  int s = 2 * n, mid = n, one = 0, left = 0;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    if (a[i] % 2) {
      a[i]--;
      left++;
    }
  }
  for (int i = 1; i <= k; i++) {
    if (a[i] >= 4) {
      int need = a[i] / 4;
      if (mid <= need) {
        a[i] -= mid * 4;
        mid = 0;
      } else {
        a[i] %= 4;
        mid -= need;
      }
    }
  }
  if (mid == 0) {
    for (int i = 1; i <= k; i++) s -= a[i] / 2;
    s -= left;
    if (s >= 0)
      cout << "YES";
    else
      cout << "NO";
    return 0;
  }
  for (int i = 1; i <= k; i++) {
    if (a[i] == 2) {
      if (s) {
        s--;
        continue;
      }
      if (mid) {
        mid--;
        left--;
        continue;
      }
      left += 2;
    }
  }
  if (s + mid * 2 >= left)
    cout << "YES";
  else
    cout << "NO";
}
