Hand Written Easy Explanation with Bézout's  Lemma
\n\n\n\n# Code\n\nclass Solution:\n    def isGoodArray(self, nums: List[int]) -> bool:\n        ans=nums[0]\n        for i in range (1,len(nums)):\n            
\n![image.png](https://assets.leetcode.com/users/images/71d340ad-c7ae-4256-940b-799a2ffd6ae5_1681532564.9413595.png)\n![image.png](https://assets.leetcode.com/users/images/4a52e4c5-59ed-4bed-9e2d-557a9669e1ae_1681532580.7018669.png)\n\n# Code\n```\nclass Solution:\n    def isGoodArray(self, nums: List[int]) -> bool:\n        ans=nums[0]\n        for i in range (1,len(nums)):\n            ans=math.gcd(ans,nums[i])\n        return ans==1\n```\n\nPlease Upvote the solution is you like it.
['Python3']