#include <bits/stdc++.h>
int N, K;
int A;
int S4, S2;
int S1 = 0;
bool result = true;
int fours = 0;
int threes = 0;
int twos = 0;
int ones = 0;
int main() {
  scanf("%d %d", &N, &K);
  S4 = N;
  S2 = 2 * N;
  for (int i = 0; i < K; i++) {
    scanf("%d", &A);
    fours += A / 4;
    if (A % 4 == 3) {
      threes++;
    } else if (A % 4 == 2) {
      twos++;
    } else if (A % 4 == 1) {
      ones++;
    }
  }
  if (S4 >= fours) {
    S4 -= fours;
  } else {
    fours -= S4;
    S4 = 0;
    twos += 2 * fours;
  }
  if (S4 >= threes) {
    S4 -= threes;
  } else {
    threes -= S4;
    S4 = 0;
    twos += threes;
    ones += threes;
  }
  if (S2 >= twos) {
    S2 -= twos;
  } else {
    twos -= S2;
    S2 = 0;
    if (S4 >= twos) {
      S4 -= twos;
      S1 += twos;
    } else {
      twos -= S4;
      S1 += S4;
      S4 = 0;
      ones += 2 * twos;
    }
  }
  if (S2 >= ones) {
    result = true;
  } else {
    ones -= S2;
    if (S4 * 2 >= ones) {
      result = true;
    } else {
      ones -= 2 * S4;
      result = (S1 >= ones);
    }
  }
  printf("%s", (result ? "YES" : "NO"));
  return 0;
}
