The whole logic
The solution should be clear at this point. Here I\'d like to tidy up the whole logic to have a better understanding of the solution.\n1. "B\xE9zout\'s identity
The solution should be clear at this point. Here I\'d like to tidy up the whole logic to have a better understanding of the solution.\n1. "B\xE9zout\'s identity:  (the GCD of a and b) is the smallest positive linear combination of non-zero a and b"[1]\n2.  For this problem, if we can find any subset, which can generate gcd(subset) = 1, it is true. Otherwise, the gcd will be greater than 1, it is obvious that it is false.\n3.  If **any subset** of the whole nums list has a gcd(subset)=1, then gcd(nums)=1 as:\n    a) The gcd is a commutative function: gcd(a, b) = gcd(b, a) [2]\n    b) The gcd is an associative function: gcd(a, gcd(b, c)) = gcd(gcd(a, b), c). [2]\n    c) If none of a1, a2, . . . , ar is zero, then gcd( a1, a2, . . . , ar ) = gcd( gcd( a1, a2, . . . , ar-1 ), ar ) [2]\n    d) It should be trival that gcd(1, n) where n is a non negative interger to be 1.\n4. based on 3, we change check \'whether we have gcd of **any subset** to be 1\' to \'check whether the gcd of the whole nums list is 1\' as: if we have a subset {**a, e, f**} and gcd(a, e, f)=1, and the whole list contains {**a,** b, c, d, **e, f**}. Based on 3a), we will have gcd(a, b, c) = gcd( gcd(a,b), c)  based on 3b)  gcd(a,gcd(b,c))=gcd(gcd(a,b),c). Based on 3a)and 3b) gcd(gcd(a,b),c) = gcd(c, gcd(a,b)) = gcd(gd(c, a), b). We can get general assocation by changing gcd(**a,** b, c, d, **e, f**)  to gcd(gcd(b,c,d), gcd(a,e,f))=1.\n\n**Reference**\n[1] https://eli.thegreenplace.net/2009/07/10/the-gcd-and-linear-combinations\n[2] https://en.wikipedia.org/wiki/Greatest_common_divisor
[]