Math fact - C++
```\nclass Solution {\npublic:\n    int gcd(int a, int b)\n    {\n        if(b == 0)\n            return a;\n        return gcd(b, a%b);\n    }\n    bool isGood
```\nclass Solution {\npublic:\n    int gcd(int a, int b)\n    {\n        if(b == 0)\n            return a;\n        return gcd(b, a%b);\n    }\n    bool isGoodArray(vector<int>& nums) {\n        // if there are 2 integers, a and b such that gcd(a, b) = d, then there exists integers x, y, such that a*x + b*y = d;\n        int g = nums[0];\n        for(auto it:nums)\n            g = gcd(g, it);\n        return g == 1;\n    }\n};
[]