fn main() { let v1: Vec = input_line(); let (_n, mut a, b, x, y) = (v1[0] as usize, v1[1], v1[2], v1[3], v1[4]); let mut hv: Vec = input_line(); while a > 0 { let max_index = get_max_idx(&hv); if hv[max_index] <= 0 { break; } hv[max_index] -= x; if hv[max_index] < 0 { hv[max_index] = 0; } a -= 1; } let b_total = b * y; let r_total = hv.iter().fold(0, |acc, x| acc + x); println!("{}", if b_total >= r_total { "Yes" } else { "No" }); } fn get_max_idx(v: &Vec) -> usize { let mut max = v[0]; let mut result: usize = 0; for (i, vi) in v.iter().enumerate() { if *vi > max { max = *vi; result = i; } } result } fn input_line() -> Vec { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() }