import java.io.*; import java.util.*; class Main { public static void main(String args[])throws Exception { BufferedReader bu=new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb=new StringBuilder(); String s[]=bu.readLine().split(" "); int n=Integer.parseInt(s[0]),a=Integer.parseInt(s[1]),b=Integer.parseInt(s[2]),x=Integer.parseInt(s[3]),y=Integer.parseInt(s[4]); int i,h[]=new int[n]; s=bu.readLine().split(" "); for(i=0;i tm=new TreeMap<>(); long del=1l*b*y; int sz=0; for(i=0;i0) { long tem=Math.min(del,h[i]); //use y values here del-=tem; h[i]-=tem; long ti=tem/x; while(ti-->0) { if(szdel && !tm.isEmpty()) { int key=tm.lowerKey(x+1); del+=key; remove(tm,key); a--; //using a sz--; } tem=Math.min(h[i],del); del-=tem; h[i]-=tem; //still now h[i]>0 ti=h[i]/x; if(h[i]%x!=0) ti++; if(ti>a) return false; a-=ti; while(sz>a) { int lo=tm.higherKey(-1); remove(tm,lo); sz--; } } return true; } static void remove(TreeMap tm,int x) { int v=tm.get(x); if(v==1) tm.remove(x); else tm.put(x,v-1); } }