This problem is about chinese remainder theorem.
If gcd(a1, a2, ..., an) =1, there exist integers x1, ..., xn such that a1x1 + .... + an xn = 1\nhttps://en.wikipedia.org/wiki/Chinese_remainder_theorem\n\n\ncla
If gcd(a1, a2, ..., an) =1, there exist integers x1, ..., xn such that a1*x1 + .... + an *xn = 1\nhttps://en.wikipedia.org/wiki/Chinese_remainder_theorem\n\n```\nclass Solution:\n    def isGoodArray(self, nums: List[int]) -> bool:\n        import math \n        n = len(nums)\n        if n ==1:\n            return nums[0] ==1\n        d = math.gcd(nums[0], nums[1])\n        for i in range(n):\n            d = math.gcd(nums[i], d)\n        return d ==1\n```
['Python', 'Python3']