name = 'gcd/3' slug = 'greatest common divisor' description = '''\

gcd(X, Y, GCD): GCD is the greatest common divisor of X and Y. Implement this predicate using constraints.

Hint: try writing a predicate to find all common divisors of two numbers first.

?- gcd(36, 84, GCD).
  GCD = 12.
''' hint = {}