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

题目描述

Give you , you need to calculate:



Because the output may be too large, let Ans_i denote , you only need to output

输入描述:

The first line has one integer .

The second line has integers .

The third line has integers .




输出描述:

Output the answer.
示例1

输入

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

输出

复制
88