Reduction code for the YDDF