'Return the tuple (R, self/R) where R is the positive Rational
extracted from self.
Examples
>>> from sympy import sqrt
>>> (-3*sqrt(2)*(2 - 2*sqrt(2))).as_content_primitive()
(6, -sqrt(2)*(-sqrt(2) + 1))
See docstring of Expr.as_content_primitive for more examples.'

def as_content_primitive(self, radical=False, clear=True):

    coef = S.One
    args = []
    for (i, a) in enumerate(self.args):
        (c, p) = a.as_content_primitive(radical=radical, clear=clear)
        coef *= c
        if (p is not S.One):
            args.append(p)
    return (coef, self.func(*args))
