/* -*- coding: utf-8 -*- * * 1736.cc: No.1736 Princess vs. Dragoness - yukicoder */ #include #include #include using namespace std; /* constant */ const int MAX_N = 3000; /* typedef */ typedef long long ll; typedef vector vi; typedef queue qi; typedef pair pii; /* global variables */ int hs[MAX_N]; /* subroutines */ /* main */ int main() { int n, a, b, x, y; scanf("%d%d%d%d%d", &n, &a, &b, &x, &y); for (int i = 0; i < n; i++) scanf("%d", hs + i); priority_queue q(hs, hs + n); while (a > 0 && ! q.empty()) { int h = q.top(); q.pop(); if (h >= x) { int d = min(a, h / x); h -= d * x, a -= d; } else h -= x, a--; if (h > 0) q.push(h); } ll sum = 0; while (! q.empty()) sum += q.top(), q.pop(); if (sum <= (ll)y * b) puts("Yes"); else puts("No"); return 0; }