#include <bits/stdc++.h>
using namespace std;
long long a[1 << 20];
int main() {
  long long n, k;
  cin >> n >> k;
  for (long long i = 0; i < k; i++) {
    cin >> a[i];
  }
  long long sz = 8 * n;
  long long seat = 0;
  long long two = 2 * n, four = n, one = 0;
  sort(a, a + k);
  long long i = 0;
  while (a[i] == 1) {
    if (four) {
      four--;
      two++;
    } else if (two) {
      two--;
    } else {
      cout << "NO";
      return 0;
    }
    i++;
  }
  for (; i < k; i++) {
    if (a[i] >= 4) {
      long long k1 = a[i] / 4;
      long long p1 = a[i] % 4;
      if (k1 > four) {
        k1 -= four;
        four = 0;
        k1 *= 2;
        if (two >= k1) {
          two -= k1;
        } else if (one >= k1 * 2) {
          one -= k1 * 2;
        } else {
          cout << "NO";
          return 0;
        }
      } else {
        four -= k1;
      }
      if (!p1) {
        continue;
      }
      if (p1 == 3) {
        if (four) {
          four--;
        } else if (two >= 2) {
          two -= 2;
        } else if (one >= 3) {
          one -= 3;
        } else {
          cout << "NO";
          return 0;
        }
      } else if (p1 == 2) {
        if (two) {
          two--;
        } else if (four) {
          four--;
          one++;
        } else if (one >= 2) {
          one -= 2;
        } else {
          cout << "NO";
          return 0;
        }
      } else {
        if (one) {
          one--;
        } else if (four) {
          four--;
          two++;
        } else if (two) {
          two--;
        } else {
          cout << "NO";
          return 0;
        }
      }
    } else {
      if (a[i] == 3) {
        if (four) {
          four--;
        } else if (two >= 2) {
          two -= 2;
        } else if (one >= 3) {
          one -= 3;
        } else {
          cout << "NO";
          return 0;
        }
      } else if (a[i] == 2) {
        if (two) {
          two--;
        } else if (four) {
          four--;
          one++;
        } else if (one >= 2) {
          one -= 2;
        } else {
          cout << "NO";
          return 0;
        }
      } else {
        if (one) {
          one--;
        } else if (four) {
          four--;
          two++;
        } else if (two) {
          two--;
        } else {
          cout << "NO";
          return 0;
        }
      }
    }
  }
  cout << "YES";
}
