In this work,we show that the difference of a Hauptmodul for a genus zero group Γ0(N)as a modular function on Y0(N)×Y0(N)is a Borcherds lift of type(2,2).As applications,we derive the monster denominator formula like product expansions for these modular functions and certain Gross-Zagier type CM value formulas.