
You are given nums , an array of positive integers of size 2 * n . You must perform n operations on this array.
In the i ^th operation (1-indexed) , you will:
Choose two elements, x and y .
Receive a score of i * gcd(x, y) .
Remove x and y from nums .
Return the maximum score you can receive after performing n operations.
The function gcd(x, y) is the greatest common divisor of x and y .
1 <= n <= 7nums.length == 2 * n1 <= nums[i] <= 10 ^6