In an action to recover damages for breach of a separation agreement, the defendant appeals, as limited by his brief, from so much of a resettled judgment of the Supreme Court, Queens County (Zelman, J.), entered June 14, 1989, as, after a nonjury trial, awarded the plaintiff the sum of $887.43 to cover one-half of certain medical expenses of their minor children and dismissed the defendant’s counterclaim to recover alleged erroneous overpayments of child support on the ground that it "was not brought timely”.
Ordered that the resettled judgment is reversed insofar as appealed from, on the law, without costs or disbursements, and the matter is remitted to the Supreme Court, Queens County, for further proceedings in accordance herewith, and entry of an appropriate amended judgment.
It is well settled that a separation agreement is a contract subject to principles of contract interpretation (see, Rainbow v Swisher, 72 NY2d 106, 109; Matter of Meccico v Meccico, 76 NY2d 822, 824), and that where the intention of the parties is clearly and unambiguously set forth, their intent "must be gleaned from within the four corners of the instrument, and not from extrinsic evidence” (Rainbow v Swisher, supra, at 109; Matter of Meccico v Meccico, supra; Slatt v Slatt, 64 NY2d 966, 967; Bono v Bono, 157 AD2d 763, 764; Howard v Howard, 120 AD2d 567, 568).
In the instant case, the plaintiff alleged, inter alia, that the defendant had breached the terms of their written separation agreement by failing to reimburse her for medical expenses incurred by the children which were not covered by the medical insurance provided by the defendant. Paragraph 10 (c) of the parties’ agreement simply provides that the defendant’s obligation in this regard is to pay for and keep in full force and effect Blue Cross and other medical and dental policies covering the children. Accordingly, it was error to allow the plaintiff to introduce parol evidence with respect to this clause, and it was also error to award her a money judgment on an item for which the defendant was not obligated to pay pursuant to the terms of the separation agreement.
*473The court also erred in dismissing the defendant’s counterclaim to recover certain alleged overpayments of child support on the ground that it was "not brought timely”. Recovery of any overpayments made during the six-year period prior to the date the counterclaim was interposed is not barred by the Statute of Limitations (see, Jacobs v Patterson, 112 AD2d 402). Further, the principles of laches or estoppel cannot be applied here. It is settled that laches and estoppel are affirmative defenses which must be pleaded (see, Markwicka v Davis, 64 NY2d 38, 42; Surlak v Surlak, 95 AD2d 371, 383; Glenesk v Guidance Realty Corp., 36 AD2d 852). A failure to plead those affirmative defenses may be remedied by amendment of the answer (see, Surlak v Surlak, supra). Contrary to the finding of our dissenting colleague, in the instant case, not only did the plaintiff fail to plead, in her reply to the counterclaim, the affirmative defenses, but she also failed to seek to amend her pleadings. While the plaintiff orally moved to amend her pleadings to conform to the proof at the trial, that application was made at the end of the plaintiff’s direct examination and solely with respect to bringing up to date the amount of tuition payments for parochial school demanded in the complaint.
Moreover, despite the feeling of outrage expressed by our dissenting colleague over what is perceived to be a grave injustice in requiring the plaintiff to reimburse the defendant for the overpayments, it should be pointed out that we have not decided the merits of that issue. Our decision herein is purely a procedural one not involving the merits, based in part upon the plaintiff’s failure to raise the affirmative defenses of laches or estoppel in her pleadings.
Accordingly, this case must be remitted to the Supreme Court, Queens County, for a new hearing on the merits of the defendant’s counterclaim, to determine whether he is entitled to a recoupment of overpayments and, if so, to determine the amount thereof and the method of payment (see, Jacobs v Patterson, 112 AD2d 402, supra; Fry v Fry, 279 App Div 122, affd 304 NY 889). Kunzeman, J. P., Balletta and O’Brien, JJ., concur.