Birthday Gift
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

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 a_1,a_2,...,a_n (1 ≤ a_i), indicating the characteristic a of each ball.
The third line contains n integers b_1,b_2,...,b_n (1 ≤ b_i), 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.
示例1

输入

复制
5
1 3 5 4 2
2 4 3 5 3

输出

复制
8