def canonical_form(n):
n = _sanitize(n)<EOL>if not isinstance(n, Factors): n = factor(n)<EOL>guide = get_guide(n)<EOL>s = Factors()<EOL>t = Factors()<EOL>rest_primes = set(n.keys()) - set(guide.keys())<EOL>for p in rest_primes:<EOL><INDENT>a = n[p]<EOL>if a & <NUM_LIT:1> == <NUM_LIT:1>:<EOL><INDENT>t[p] = a<EOL><DEDENT>else:<EOL><INDENT>s[p] = a<EOL><DEDENT><DEDENT>if int(guide) * int(s) * int(t) != int(n):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return guide, s, t<EOL>
Splits a number into its canonical aliquot form, i.e. (2^b*v)*s*t where 2^b*v
    is the guide, s is even powered primes, and t is everything else/odd powered primes.
    The return value is (guide, s, t) where each is a Factors instance