#include <bits/stdc++.h>
using namespace std;
int a[200];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= k; i++) cin >> a[i];
  sort(a + 1, a + k + 1);
  int m = n, mleft = 0, p = 2 * n;
  for (int i = k; i >= 1; i--) {
    if (m >= a[i] / 4)
      m -= a[i] / 4, a[i] %= 4;
    else {
      a[i] -= 4 * m, m = 0;
      if (p >= a[i] / 2)
        p -= a[i] / 2, a[i] %= 2;
      else
        a[i] -= p * 2, p = 0;
    }
    if (a[i] == 3) {
      if (mleft >= 3)
        mleft -= 3;
      else if (m)
        m--;
      else if (p >= 2)
        p -= 2;
      else {
        puts("NO");
        return 0;
      }
    } else if (a[i] == 2) {
      if (p)
        p--;
      else if (m)
        m--, mleft++;
      else if (mleft >= 2)
        mleft -= 2;
      else {
        puts("NO");
        return 0;
      }
    } else if (a[i] == 1) {
      if (mleft)
        mleft--;
      else if (m)
        m--, p++;
      else if (p)
        p--;
      else {
        puts("NO");
        return 0;
      }
    }
  }
  puts("YES");
  return 0;
}
