made coprime use gcd