13344: 向量积

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:0

Description

有两个向量v1=(x1,x2...xn) v2=(y1,y2...yn),允许任意交换v1,v2各自的分量的顺序。请计算V1,V2向量积

(x1*y1+x2*y2......)的最小值

限制条件
1<=n<=400
-100000<=xi,yi<=100000

Input

先输入n.
接下来两行,第一行输入x1...xn,第二行输入y1...yn

Output

向量积的最小值

Sample Input Copy

3
1 3 -5
-2 4 1
5
1 2 3 4 5
1 0 1 0 1

Sample Output Copy

-25
6