def monomial_div(A, B):
    C = monomial_ldiv(A, B)

    if all(c >= 0 for c in C):
        return tuple(C)
    else:
        return None
Tests:
dataset/ETHPy150Open sympy/sympy/sympy/polys/monomials.py/monomial_div--crossover with--dataset/ETHPy150Open typesupply/woffTools/Lib/woffTools/tools/validate.py/_testHeaderTotalSFNTSize