Clocking Chaos


Submit solution

Points: 1
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
C, C++, Java, Python

Jack is upgrading his PC, and he has only one component left to buy, the most important of all, the CPU. Jack doesn't care about the price - all he cares about is raw processing power. Jack has been given a list of CPU specs, containing their clock speed at 1V, and the maximum voltage that a CPU can be run at. Given that a CPU's clock changes in proportion to the voltage, help Jack determine the most powerful CPU.

Input

The first line contains a single integer N (1\leq N\leq10^6) - the number of processors that Jack is considering.

The next line contains integers C_1\ \dots\ C_N ( 0\leq C_i \leq10^8) - C_i is the clock speed of the ith processor.

The final line contains decimal numbers V_1\ \dots\ V_N ( 0.0 \leq V_i\leq 10.0) - V_i is the maximum voltage of the ith processor.

Output

Output a single number M - the maximum clock speed Jack can produce, to 3 decimal places

Example

Input 1
4
3 8 2 6
1.5 2.3 5.9 1.8
Output 1
18.400

9 \times 2.3 = 18.4

Input 2
4
6 6 8 7
3.11 6.65 5.35 3.88
Output 2
42.800

Comments

There are no comments at the moment.