Daenerys Targaryen has an army consisting of k groups of soldiers, the i-th group contains ai soldiers. She wants to bring her army to the other side of the sea to get the Iron Throne. She has recently bought an airplane to carry her army through the sea. The airplane has n rows, each of them has 8 seats. We call two seats neighbor, if they are in the same row and in seats {1, 2}, {3, 4}, {4, 5}, {5, 6} or {7, 8}.

<image> A row in the airplane

Daenerys Targaryen wants to place her army in the plane so that there are no two soldiers from different groups sitting on neighboring seats.

Your task is to determine if there is a possible arranging of her army in the airplane such that the condition above is satisfied.

Input

The first line contains two integers n and k (1 ≤ n ≤ 10000, 1 ≤ k ≤ 100) — the number of rows and the number of groups of soldiers, respectively.

The second line contains k integers a1, a2, a3, ..., ak (1 ≤ ai ≤ 10000), where ai denotes the number of soldiers in the i-th group.

It is guaranteed that a1 + a2 + ... + ak ≤ 8·n.

Output

If we can place the soldiers in the airplane print "YES" (without quotes). Otherwise print "NO" (without quotes).

You can choose the case (lower or upper) for each letter arbitrary.

Examples

Input

2 2
5 8


Output

YES


Input

1 2
7 1


Output

NO


Input

1 2
4 4


Output

YES


Input

1 4
2 2 1 2


Output

YES

Note

In the first sample, Daenerys can place the soldiers like in the figure below:

<image>

In the second sample, there is no way to place the soldiers in the plane since the second group soldier will always have a seat neighboring to someone from the first group.

In the third example Daenerys can place the first group on seats (1, 2, 7, 8), and the second group an all the remaining seats.

In the fourth example she can place the first two groups on seats (1, 2) and (7, 8), the third group on seats (3), and the fourth group on seats (5, 6).
import java.io.*;
import java.util.Arrays;

public class B {

  private static final String REGEX = " ";
  private static final Boolean DEBUG = false;
  private static final String FILE_NAME = "input.txt";


  public static void main(String[] args) throws IOException {
    if (DEBUG) {
      generate();
    }
    Solver solver = new Solver();
    solver.readData();
    solver.solve();
    solver.print();
  }

  private static void generate() throws IOException {
//    FileWriter writer = new FileWriter("input.txt");
//    writer.close();
  }

  private static class Solver {
    private StringBuilder myStringBuilder = new StringBuilder();
    int n, k;
    int[] a;


    void readData() throws IOException {
      Scanner scanner = new Scanner();
      n = scanner.nextInt();
      k = scanner.nextInt();
      a = splitInteger(scanner.nextLine(), k);
      scanner.close();
    }

    void solve() {
      int free4 = n;
      int free2 = n * 2;
      int free1 = 0;
      int sum = sum(a);
      int index = 0;
      while (sum > 0) {
        if (a[index] == 0) {
          index++;
          index = index % k;
          continue;
        }
        if (a[index] >= 4) {
          if (free4 > 0) {
            free4--;
            a[index] -= 4;
            sum -= 4;
          } else {
            if (free2 > 1) {
              a[index] -= 4;
              sum -= 4;
              free2 -= 2;
            } else if (free1 > 0) {
              a[index] -= 1;
              sum -= 1;
              free1 -= 1;
            } else {
              out("NO");
              return;
            }
          }
        } else if (a[index] == 3 && free4 > 0) {
          a[index] -= 3;
          sum -= 3;
          free4--;
        } else if (a[index] == 3 && free4 == 0) {
          if (free2 > 1) {
            a[index] -= 3;
            sum -= 3;
            free2 -= 2;
          } else if (free1 > 0) {
            a[index] -= 1;
            sum -= 1;
            free1 -= 1;
          } else {
            out("NO");
            return;
          }
        } else if (a[index] == 2) {
          if (free2 > 0) {
            a[index] -= 2;
            sum -= 2;
            free2--;
          } else if (free4 > 0) {
            a[index] -= 2;
            sum -= 2;
            free4--;
            free1++;
          } else if (free1 > 0) {
            a[index] -= 1;
            sum -= 1;
            free1 -= 1;
          } else {
            out("NO");
            return;
          }
        } else if (a[index] == 1) {
          if (free1 > 0) {
            free1--;
            a[index]--;
            sum--;
          } else if (free4 > 0) {
            free4--;
            free2++;
            a[index]--;
            sum--;
          } else if (free2 > 0) {
            free2--;
            a[index]--;
            sum--;
          } else {
            out("NO");
            return;
          }
        }
      }
      out("YES");

    }

    void print() {
      System.out.println(myStringBuilder);
    }


    void out(Object object) {
      myStringBuilder.append(object);
    }

    void out(String string) {
      myStringBuilder.append(string);
    }

    public void out(boolean b) {
      myStringBuilder.append(b);
    }

    public void out(char c) {
      myStringBuilder.append(c);
    }

    public void out(int i) {
      myStringBuilder.append(i);
    }

    public void out(long lng) {
      myStringBuilder.append(lng);
    }

    public void out(float f) {
      myStringBuilder.append(f);
    }

    public void out(double d) {
      myStringBuilder.append(d);
    }

    public void newLine() {
      myStringBuilder.append("\n");
    }

    @SuppressWarnings("SameParameterValue")
    int[] splitInteger(String string, int n) {
      final String[] split = string.split(REGEX, n);
      int[] result = new int[split.length];
      for (int i = 0; i < n; ++i) {
        result[i] = Integer.parseInt(split[i]);
      }
      return result;
    }

    public int[] splitInteger(String string) {
      return splitInteger(string, 0);
    }


    @SuppressWarnings("SameParameterValue")
    long[] splitLong(String string, int n) {
      final String[] split = string.split(REGEX, n);
      long[] result = new long[split.length];
      for (int i = 0; i < n; ++i) {
        result[i] = Long.parseLong(split[i]);
      }
      return result;
    }

    public long[] splitLong(String string) {
      return splitLong(string, 0);
    }

    @SuppressWarnings("SameParameterValue")
    double[] splitDouble(String string, int n) {
      final String[] split = string.split(REGEX, n);
      double[] result = new double[split.length];
      for (int i = 0; i < n; ++i) {
        result[i] = Double.parseDouble(split[i]);
      }
      return result;
    }

    public double[] splitDouble(String string) {
      return splitDouble(string, 0);
    }

    @SuppressWarnings("SameParameterValue")
    String[] splitString(String string, int n) {
      return string.split(REGEX, n);
    }

    public String[] splitString(String string) {
      return splitString(string, 0);
    }

    public int max(int a, int b) {
      return Math.max(a, b);
    }

    public int max(int[] arr) {
      int max = Integer.MIN_VALUE;
      for (int x : arr) {
        max = max(max, x);
      }
      return max;
    }

    int sum(int[] arr) {
      int sum = 0;
      for (int i = 0; i < arr.length; i++) {
        sum += arr[i];
      }
      return sum;
    }

    long sum(long[] arr) {
      long sum = 0;
      for (int i = 0; i < arr.length; i++) {
        sum += arr[i];
      }
      return sum;
    }

    public long max(long a, long b) {
      return Math.max(a, b);
    }

    public int min(int a, int b) {
      return Math.min(a, b);
    }

    public long min(long a, long b) {
      return Math.min(a, b);
    }

    public double max(double a, double b) {
      return Math.max(a, b);
    }

    public double min(double a, double b) {
      return Math.min(a, b);
    }

    private final static int MOD = 1000000009;

    int multMod(int a, int b) {
      return ((a % MOD) * (b % MOD)) % MOD;
    }

    int sumMod(int a, int b) {
      return ((a % MOD) + (b % MOD)) % MOD;
    }

    long multMod(long a, long b) {
      return ((a % MOD) * (b % MOD)) % MOD;
    }

    long sumMod(long a, long b) {
      return ((a % MOD) + (b % MOD)) % MOD;
    }

  }

  private static class Scanner {
    private int currentIndex = 0;
    private String[] objects;
    private final BufferedReader myReader;
    private Computable<Character> charComputer;
    private Computable<Double> doubleComputer;
    private Computable<Integer> intComputer;
    private Computable<Long> longComputer;

    Scanner() throws FileNotFoundException {
      InputStream in = DEBUG ? new FileInputStream(FILE_NAME) : System.in;
      myReader = new BufferedReader(new InputStreamReader(in));
      charComputer = () -> objects[currentIndex].charAt(0);
      doubleComputer = () -> Double.parseDouble(objects[currentIndex]);
      intComputer = () -> Integer.parseInt(objects[currentIndex]);
      longComputer = () -> Long.parseLong(objects[currentIndex]);
    }

    String nextLine() throws IOException {
      objects = null;
      currentIndex = 0;
      return myReader.readLine();
    }

    int nextInt() throws IOException {
      return next(intComputer);

    }

    long nextLong() throws IOException {
      return next(longComputer);

    }

    double nextDouble() throws IOException {
      return next(doubleComputer);

    }

    char nextChar() throws IOException {
      return next(charComputer);
    }

    <T> T next(Computable<T> computer) throws IOException {
      T result;
      if (objects == null || currentIndex >= objects.length) {
        String s = myReader.readLine();
        objects = s.split(" ");
        currentIndex = 0;
      }
      result = computer.compute();
      currentIndex++;
      return result;
    }

    interface Computable<T> {
      T compute();
    }

    public void close() throws IOException {
      myReader.close();
    }
  }

}
