#coprime test def gcd(a,b): q = m%n if q ==0: return n else: return gcd(n, q) def iscoprime(a,b): return gcd(a,b) == 1