Mr. Maxwell is an employee of an enterprise. He works either in the morning or in the afternoon. If working in the morning, he will visit attraction with his family in A city in the afternoon. If working in the afternoon, he will do the visit in the morning. He can only visit one attraction each day. There are indoor attractions and
outdoor attractions in A city, and there's a specified
for each attraction. Consider the pleasure he got from the attraction each time he visited as
.
The Mr.Maxwell gets each time he visits the attraction is equal to the current
of the attraction multiplied by the conversion rate of this visit.
For each attraction, the conversion rate from its current to
is
on the first visit, and for each repeat visit, it is reduced to
of the previous one.
For outdoor attractions, their is reduced to
in the afternoon, but will be restored every morning.
For instance, if Mr.Maxwell visits an outdoor attraction which hasn't been visited before in the afternoon, with the
, the
for this visit should be
. If he visits the same attraction once again, the
he gets will be
in the morning, or
in the afternoon.
Now there are days left in this quarter.
Mr. Maxwell is free to choose to work in the morning or afternoon, but the number of morning-working days must be equal to or greater than .
Please calculate the maximum sum of he can get.
The first line contains four integers
![]()
.
The second line contains
integers, the
integer
denotes the beauty value of the
indoor attraction.
The third line contains
integers, the
integer
denotes the beauty value of the
outdoor attraction.
Output one real number representing the maximum sum of pleasure value Mr. Maxwell can get in nextdays. The result should be rounded up to 2 decimal places.