Production of W and Z in the UA2 Experiment at the CERN p̄p Collider