#include using namespace std; using ll = long long; ll n, x, y, z; vector a; void func(ll val, ll rem) { for(int i = 0; i < n; i++) { ll m = min(a[i] / val, rem); a[i] -= m * val; rem -= m; } sort(a.begin(), a.end()); for(int i = n - 1; i >= 0; i--) { if(rem) { a[i] = 0; rem--; } } return; } int main() { cin >> n >> x >> y >> z; a.resize(n); for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 0; i < n; i++) a[i] = (a[i] / 1000 + 1) * 1000; func(10000, z); func(5000, y); func(1000, x); for(int i = 0; i < n; i++) if(a[i] > 0) { cout << "No" << endl; return 0; } cout << "Yes" << endl; return 0; }