#include <bits/stdc++.h>
using namespace std;
long long t[5];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, k;
  cin >> n >> k;
  long long t1 = n, t2 = 2 * n;
  for (long long i = 0; i < k; i++) {
    long long x;
    cin >> x;
    long long y = x / 4;
    long long mn = min(y, t1);
    t1 -= mn;
    t[2] += (y - mn) * 2;
    t[x % 4]++;
  }
  long long mn;
  t[1] += t[3];
  t[2] += t[3];
  mn = min({t[1], t[2], t1});
  t1 -= mn;
  t[2] -= mn;
  t[1] -= mn;
  mn = min({t2, t[2]});
  t2 -= mn;
  t[2] -= mn;
  mn = min(t1, t[2]);
  t1 -= mn;
  t[2] -= mn;
  t[1] += t[2] * 2;
  int mn2 = min(mn, t[1]);
  t[1] -= mn2;
  mn = min(t1, t[1] / 2);
  t1 -= mn;
  t[1] -= (mn * 2);
  if (t[1] > t1 + t2) {
    cout << "NO";
    return 0;
  }
  cout << "YES";
  return 0;
}
