'Returns the content and a primitive form of ``f``.
Examples
>>> from sympy import Poly
>>> from sympy.abc import x
>>> Poly(2*x**2 + 8*x + 12, x).primitive()
(2, Poly(x**2 + 4*x + 6, x, domain=\'ZZ\'))'

def primitive(f):

    if hasattr(f.rep, 'primitive'):
        (cont, result) = f.rep.primitive()
    else:
        raise OperationNotSupported(f, 'primitive')
    return (f.rep.dom.to_sympy(cont), f.per(result))
