The plaintiff and the defendants in said action, including the county of Suffolk, who are the holders of certificates of sale, shall be paid from the proceeds of sale the several amounts paid for real estate purchased as mentioned and described in the certificates of sale held by them, with all interest, penalties, additions, costs and expenses allowed by law, so far as the said proceeds shall suffice to pay the same, in the order of the lawful priority of the liens and the interest of the respective parties in and against the premises as the same may be determined in this action. It shall be sufficient for any such defendant to set forth in his answer his certificate of sale or the substance thereof with the other allegations in effect as herein provided with regard to the complaint in the action. A defendant alleging irregularity or invalidity in any tax, assessment or sale shall particularly specify in his answer such irregularity or invalidity.
N.Y. Suffolk County Tax Act § 58