Greatest Common Monomial Factor