Just Brute Force it !!
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:$$O(n^2)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long lcm_cal(vector<int>temp){\n        if(temp.size()==0)return 0;\n        long long ans=temp[0];\n        for(int i=0;i<temp.size();i++)ans=lcm(ans,temp[i]);\n        return ans;\n    }\n    long long gcd_cal(vector<int>temp){\n        if(temp.size()==0)return 0;\n        long long ans=temp[0];\n        for(int i=0;i<temp.size();i++)ans=gcd(ans,temp[i]);\n        return ans;\n    }\n    long long maxScore(vector<int>& nums) {\n        long long factor_score=lcm_cal(nums)*(gcd_cal(nums));\n        for(int i=0;i<nums.size();i++){\n            vector<int>temp;\n            for(int j=0;j<i;j++)temp.push_back(nums[j]);\n            for(int k=i+1;k<nums.size();k++)temp.push_back(nums[k]);\n            factor_score=max(factor_score,(lcm_cal(temp)*(gcd_cal(temp))));\n        }\n        return factor_score;\n    }\n};\n```
['Array', 'Math', 'Number Theory', 'C++']