#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int i=0;i> n >> x >> y >> z; rep(i, n) { cin >> a[i]; a[i] = a[i] / 1000 + 1; } rep(i, n) { int t = a[i] / 10; if (z >= t) { z -= t; a[i] %= 10; } else { a[i] -= z * 10; z = 0; } } rep(i, n) { int t = a[i] / 5; if (y >= t) { y -= t; a[i] %= 5; } else { a[i] -= 5 * y; y = 0; } } sort(a, a + n); reverse(a, a + n); rep(i, n) { int t = (a[i]+9) / 10; if (z >= t) { z -= t; a[i] = 0; } else { a[i] -= z * 10; z = 0; } } sort(a, a + n); reverse(a, a + n); rep(i, n) { int t = (a[i]+4) / 5; if (y >= t) { y -= t; a[i] = 0; } else { a[i] -= 5 * y; y = 0; } } sort(a, a + n); reverse(a, a + n); rep(i, n) { if (x >= a[i]) { x -= a[i]; a[i] = 0; } else { a[i] -= x; x = 0; } } sort(a, a + n); if (a[n - 1])puts("No"); else puts("Yes"); }