Returns true if all prime factors of y divide x .
def isDivisible ( x , y ) : NEW_LINE INDENT if ( y == 1 ) : NEW_LINE INDENT return 1 NEW_LINE DEDENT z = gcd ( x , y ) ; NEW_LINE if ( z == 1 ) : NEW_LINE INDENT return false ; NEW_LINE DEDENT return isDivisible ( x , y / z ) ; NEW_LINE DEDENT