#include <bits/stdc++.h>
using namespace std;
struct TreeNode {
  int val;
  TreeNode* left;
  TreeNode* right;
  TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
struct ListNode {
  int val;
  ListNode* next;
  ListNode(int x) : val(x), next(NULL) {}
};
int nxt() {
  int x;
  cin >> x;
  return x;
}
long long nxtLong() {
  long long x;
  cin >> x;
  return x;
}
string nxtStr() {
  string x;
  cin >> x;
  return x;
}
char nxtChar() {
  char x;
  cin >> x;
  return x;
}
double nxtDouble() {
  double x;
  cin >> x;
  return x;
}
long double nxtLDouble() {
  long double x;
  cin >> x;
  return x;
}
TreeNode* makeTree(int n) {
  queue<TreeNode*> tree_nodes;
  TreeNode* root;
  if (n) {
    root = new TreeNode(nxt());
    tree_nodes.push(root);
  } else {
    return NULL;
  }
  while (!tree_nodes.empty()) {
    TreeNode* node = tree_nodes.front();
    tree_nodes.pop();
    bool left;
    cin >> left;
    if (left) {
      node->left = new TreeNode(nxt());
      tree_nodes.push(node->left);
    }
    bool right;
    cin >> right;
    if (right) {
      node->right = new TreeNode(nxt());
      tree_nodes.push(node->right);
    }
  }
  return root;
}
ListNode* makeLinkedList(int n) {
  ListNode* list = new ListNode(0);
  ListNode* dummy = list;
  for (int i = 0; i < n; ++i) {
    list->next = new ListNode(nxt());
    list = list->next;
  }
  return dummy->next;
}
void solve() {
  int n = nxt(), k = nxt();
  vector<int> have(5), cnt(3);
  have[2] = 2 * n, have[4] = n;
  for (int i = 0; i < k; ++i) {
    int x = nxt();
    while (x >= 3) {
      if (have[4]) {
        x -= 4;
        have[4]--;
      } else {
        if (have[2]) {
          x -= 2;
          have[2]--;
        } else {
          cout << "NO\n";
          return;
        }
      }
    }
    if (x > 0) {
      cnt[x]++;
    }
  }
  while (cnt[2]) {
    if (have[2] > 0) {
      cnt[2]--;
      have[2]--;
    } else {
      if (have[4] > 0) {
        cnt[2]--;
        have[4]--;
        have[1]++;
      } else {
        cnt[2]--;
        cnt[1] += 2;
      }
    }
  }
  if (cnt[1] > have[1] + have[2] + have[4] * 2) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(9);
  solve();
  return 0;
}
