n, x, y, z = map(int, input().split()) C = [-((int(w)+1)//-1000) for w in input().split()] m = sum(c//10 for c in C) z, m = max(z-m, 0), max(m-z, 0) C = sorted(c%10 for c in C)[:max(n-z, 0)] f = sum(c//5 for c in C) + 2*m y, f = max(y-f, 0), max(f-y, 0) C = sorted(c%5 for c in C)[:max(len(C)-y, 0)] t = sum(C) + 5*f print('No' if t>x else 'Yes')