The issue arises upon the People’s contention that sentences for consecutive terms in excess of the periods permitted by the applicable statute were imposed pursuant to a plea bargain and were valid as proper subjects of the plea-bargaining process. In unanimously reversing the judgments of conviction, the Appellate Division correctly held that the two crimes of which each defendant was convicted ‘ ‘ were committed as parts of a single * * * transaction” (Penal Law, § 70.25, subd. 3); the statute cited further providing that when, in such case, consecutive definite sentences of imprisonment are imposed, “the aggregate of the terms of such sentences shall not exceed one year.”
The defendants were jointly indicted for robbery in the first degree, petit larceny and possessing a weapon, dangerous instrument and appliance as a felony (Penal Law, §§ 160.15, 155.25, 265.05). Each pleaded guilty to petit larceny, which was the second count, and to the class E felony of attempted possession of a weapon, under the third count, such pleas being accepted in satisfaction of the indictment and of certain related burglary charges which had not been included in the indictment. Upon the recommendation of the prosecutor that an alternative definite sentence be imposed for the class E felony (Penal Law, § 70.05), the court sentenced each defendant to a one-year term *150on that count and to. a like term on the misdemeanor count and directed that the sentences be served consecutively. Had the alternative method not been employed, the conviction of the class E felony would have rendered defendants subject to indeterminate sentences of from one to four years (Penal Law, § 70.00). Instead, the definite one-year sentence was imposed.1
It appeared from admissions made by defendants at the time of sentence that in the course of the commission of the larceny one defendant was armed with a stiletto and the other with an opened pocket knife. Thus the attempted possession of weapons, of which defendants were convicted, and the petit larceny in their conceded taking of $25, were parts of a single transaction, a conclusion with which appellant ‘ ‘ does not disagree ’ ’; and hence consecutive sentences were within the proscription of subdivision 3 of section 70.25. This conclusion, too, remains undisputed.
The People contend, however, that the defendants- waived the provisions of subdivision 3, pursuant to a plea bargain — a claim that the record does not support and defendants decline to concede. Indeed, the only indication of any previous discussion is to be found in the remarks of the Trial Judge immediately prior to the imposition of sentence. He said: “ We had a discussion at the Bench before this plea was entered, and one of the main considerations in taking the pleas that were taken and coming to a conclusion concerning the disposition from the sentence basis was the fact that the complainants in this case were about ninety years old, and we didn’t want to subject them to bringing them to Court, with the possible strain and anxiety that might entail. As a result of that and on the recommendation of the district attorney, the sentence of the Court as to each defendant is: * * Here there is a reference to sentence ; but certainly no implication of an agreement and waiver in respect of sentence is to be found in these words; and, differ*151ing from the case of a so-called hypothetical crime where the guilty plea serves, at one and the same time, to formulate the offense and to waive objection to any seeming inconsistency, a plea of guilt tendered in a case such as this could not logically or reasonably be deemed to waive any infirmity or invalidity in a sentence to be imposed some time in future. Assuming, nevertheless, that a defendant can effectively waive the mandatory provisions of subdivision 3, whether as an incident to a plea bargain or otherwise, it is clear that in this case, no waiver has been demonstrated.
It seems to us advisable, however, to reach the broader issue as to the permissibility, in general, of a plea bargain designed to vitiate the provisions of subdivision 3; and we turn to that question. Asserting that such an arrangement can properly be made, the People rely principally on the analogy they profess to find in our decision in People v. Foster (19 N Y 2d 150). There we sustained a conviction, upon a plea of guilty, of attempted manslaughter, as against the contention that no such crime could exist, inasmuch as an attempted crime of necessity requires intent while manslaughter by definition excludes it. We held in an opinion by Judge Scileppi (p. 154) that the “ plea should be sustained on the ground that it was sought by defendant and freely taken as part of a bargain which was struck for the defendant’s benefit and, as supportive of our decision, we cited and explicitly approved the rationale of People v. Griffin (7 N Y 2d 511). In that case, Judge Van Voorhis, writing for the court, pointed to the distinction between a plea of guilty to a lesser crime, which does not admit the facts that he is guilty or not guilty of the crime therein charged, and a plea of guilty to a lesser crime, which does not admit the facts charged in the indictment (Code Crim. Pro., § 334, subd. 2); the defendant simply ‘ ‘ pleads guilty to something else ’ ’, that is, to the crime, hypothetical or not, specified in the plea itself; the plea in such case referring to the indictment only in respect of ‘ ‘ the time, place and intended victim ’ ’ described therein (p. 515). Quite unlike the case before us, wherein an explicit mandatory sentencing statute was contravened, the plea to a lesser offense, including a hypothetical offense, is “ authorized by statute ”, as Judge Van Yoorhis was careful to point out, *152and in particular by sections 334 and 342-a of the Code of Criminal Procedure (p. 516).
In the statute before us nothing could be more clear and explicit than the imperative: ‘ ‘ the aggregate of the terms of such sentences shall not exceed one year ” (Penal Law, § 70.25, subd. 3). Surely a Judge, a prosecutor and a defendant cannot by agreement restructure substantive law to fit their notion of what is more appropriate in a particular case. If, in cases such as this, the legal scheme of punishment is not sufficiently flexible, the remedy lies with the Legislature.
The orders should be affirmed.
. The imposition of that sentence, having the effect of a misdemeanor sentence, barred the use of the felony as a predicate for recidivist treatment (Penal Law, § 70.10, subd. 1, par. [b], el. [i]); but the sentence had to be limited to one year; and it is inferable from the prosecutor’s argument here, although not from the record, that it was considered that this punishment was too light and that it could not be increased except by imposition of an additional, consecutive term of one year upon the petit larceny plea.