A research lab worked out how to make two substances that nobody had made before, A and B. Whether they can really be produced is not the question here. Both are made by mixing N materials M1,M2,…,MN in fixed proportions. One gram of A is worth X, and one gram of B is worth Y.
Making 1 g of A uses GAi g of Mi, and making 1 g of B uses GBi g of Mi. Every material is rare, and only Wi g of Mi is left. A and B may be produced in any nonnegative real number of grams, not only whole grams.
Write a program that finds the largest value obtainable from the remaining materials, and how many grams of A and how many grams of B reach that value.
The first line contains N, X, and Y.
The second line contains GA1,GA2,…,GAN, the third line contains GB1,GB2,…,GBN, and the fourth line contains W1,W2,…,WN.
1≤N≤200000. Every number other than N is a natural number between 1 and 1000000.
Print the largest obtainable value on the first line.
Print how many grams of A and how many grams of B to make on the second line, separated by a space.
Round all three exact values to two digits after the decimal point. Round up when the discarded part is exactly half. For example, print 250000.13 when the exact value is 250000.125.
If several plans reach the largest value, print the one that makes the least A.