On Derrick's birthday, Derrick received a gift from his girlfriend Sandy. The gift consists n tiny balls, and each of them has two characteristics a and b. As Derrick is boring, he just wants to play with these balls.
Each time Derrick chooses two balls randomly. For each pair of balls x, y, Derrick defines their beautiful value as
)
.
Given the properties a and b of all the n tiny balls, Derrick will select exactly two of them and maximum their beautiful value. Now he needs your help, please help him.
输入描述:
Each input file only contains one test case.
The first line contains an integer n (2 ≤ n ≤ 2×
), indicating the total number of the tiny balls.
The second line contains n integers
(1 ≤
≤
), indicating the characteristic a of each ball.
The third line contains n integers
(1 ≤
≤
), indicating the characteristic b of each ball.
输出描述:
For each test case, output a single integer in a line indicating the maximum beautiful value of the given tiny balls.