def square_factor(a):
 f = (a if isinstance(a, dict) else factorint(a))
 return Mul(*[(p ** (e // 2)) for (p, e) in f.items()])

def square_factor ( a ) : f = ( a if isinstance ( a , dict ) else factorint ( a ) ) return Mul ( * [ ( p ** ( e // 2 ) ) for ( p , e ) in f . items ( ) ] )
returns an integer c s .