Mr. Green , the former New York City public advocate , bought airtime for his 30-second commercial in western New York , just as one of his fellow Democratic rivals , Andrew M. Cuomo , and Jeanine F. Pirro , the Republican candidate , did .