Phase transition for the dilute clock model