#include <bits/stdc++.h>
using namespace std;
long long modpow(long long base, long long exponent, long long modulus) {
  if (base == 0 && exponent == 0) return 0;
  long long result = 1;
  while (exponent > 0) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent = exponent >> 1;
    base = (base * base) % modulus;
  }
  return result;
}
int N, M, K, L = 0;
vector<int> odd, even;
bool fn(int a) {
  while (a) {
    if (a == 1) {
      if (L) {
        L--;
      } else if (M) {
        M--;
        N++;
      } else if (N) {
        N--;
      } else {
        cout << "NO\n";
        return false;
      }
      a--;
    } else if (a == 2) {
      if (N) {
        N--;
      } else if (M) {
        M--;
        L++;
      } else if (L >= 2) {
        L -= 2;
      } else {
        cout << "NO\n";
        return false;
      }
      a -= 2;
    } else if (a == 3) {
      if (N) {
        N--;
      } else if (M) {
        M--;
        L++;
      } else if (L >= 2) {
        L -= 2;
      } else {
        cout << "NO\n";
        return false;
      }
      a -= 2;
    } else {
      if (M) {
        M--;
        a -= 4;
      } else if (N) {
        a -= 2;
        N--;
      } else if (L >= 4) {
        a -= 4;
        L -= 4;
      } else {
        cout << "NO\n";
        return false;
      }
    }
  }
  return true;
}
inline void ReadInput(void) {
  scanf("%d", &N);
  scanf("%d", &K);
}
inline void solve(void) {
  M = N;
  N *= 2;
  for (int i = 0; i < K; i++) {
    int a;
    scanf("%d", &a);
    if (a % 2 == 1) {
      odd.push_back(a);
    } else {
      even.push_back(a);
    }
  }
  for (int i = 0; i < even.size(); i++) {
    if (fn(even[i]))
      ;
    else
      return;
  }
  for (int i = 0; i < odd.size(); i++) {
    if (fn(odd[i]))
      ;
    else
      return;
  }
  cout << "YES\n";
}
inline void Refresh(void) {}
int main() {
  ReadInput();
  solve();
  return 0;
}
