OPINION OF THE COURT
Stein, J.Defendant waived indictment, pleaded guilty to a superior court information charging him with attempted rape in the second degree and waived his right to appeal. County Court ultimately adjudicated him to be a youthful offender and sentenced him to a prison term of four years, to be followed by three years of postrelease supervision. Defendant now appeals, on the sole basis that his sentence was illegal.1 The issue before us — one that has yet to be squarely resolved by this Court— distills to whether the sentencing guidelines applicable to a youthful offender who committed a felony permit the imposition of a determinate sentence of imprisonment. For the reasons that follow, we conclude that they do not.
In interpreting the relevant statutes, we begin with the premise that “the statutory text provides the clearest indication of legislative intent, and should be construed to give effect to its plain meaning” (Matter of United Parcel Serv., Inc. v Tax Appeals Trib. of the State of N.Y., 98 AD3d 796, 797 [2012], lv denied 20 NY3d 860 [2013] [internal quotation marks and citations omitted]; see Majewski v Broadalbin-Perth Cent. School Dist., 91 NY2d 577, 583 [1998]). Penal Law § 60.02 (2) provides, as relevant here, that a sentencing court must impose upon a youthful offender “a sentence authorized to be imposed upon a person convicted of a class E felony” (emphasis added). In turn, the permissible prison sentence for a person convicted of an undesignated class E felony is an indeterminate sentence with a minimum of one year and a maximum of four years (see Penal Law § 70.00 [2] [e]). Nonetheless, the People contend that the sentence to be imposed must be based upon the classification of felony attributable to the underlying offense.2 Inasmuch as *18Penal Law § 60.02 (2) refers to “a class E felony,” without any reference to the classification of the felony committed, we cannot agree.
Our conclusion is supported by other provisions of the Criminal Procedure Law relating to youthful offender adjudications. For example, among the factors that a court should consider in determining whether youthful offender status is appropriate is whether the interest of justice would be served “by not imposing an indeterminate term of imprisonment of more than four years” (CPL 720.20 [1] [a] [emphasis added]). When Penal Law § 60.02 (2) is read in conjunction with CPL 720.20 (1) (a), it is clear that the authorized sentence for a youthful offender adjudication substituted for any felony conviction is an indeterminate term that does not exceed a maximum of four years, “regardless of the classification of the felony committed” (William C. Donnino, Practice Commentary, McKinney’s Cons Laws of NY, Book 39, Penal Law § 60.02; see Penal Law § 70.00 [2] [e]; People v Tyler E., 75 AD3d 666, 666 [2010]).
Notably, when the youthful offender statute was enacted, determinate sentences were not permitted for any felony sex offenses (see L 2007, ch 7, § 30) or drug felonies (see L 2004, ch 738) and there was no distinct category of violent felony (see L 1978, ch 481; William C. Donnino, Practice Commentary, McKinney’s Cons Laws of NY, Book 39, Penal Law § 60.02). If the Legislature intended that the sentence for a youthful offender should be based upon the classification of the felony committed, it could have amended Penal Law § 60.02 (2) to indicate such when it subsequently modified the sentencing provisions for class E felony sex and drug offenses and added the violent class E felony category.3 We also note that the absence of a reference to the classification of the underlying felony offense *19committed by a youthful offender in the statute governing sentences of imprisonment is in direct contrast to the statute governing the appropriate term of probation — an alternate sentence for a person convicted of a class E felony (see Penal Law § 65.00 [1] [a]) — which is expressly dependent upon the classification of the underlying offense (see Penal Law § 65.00 [3]; People v Brandon T, 19 AD3d 883, 884 [2005]).
Construing the related statutory provisions together (see McKinney’s Cons Laws of NY, Book 1, Statutes § 221), we conclude that Penal Law § 60.02 (2) does not authorize the imposition of a determinate sentence for a youthful offender and, therefore, defendant was illegally sentenced. Inasmuch as the appropriate remedy for an illegal sentence of a youthful offender is modification of the sentence (see People v Calderon, 79 NY2d 61, 67 [1992]), we vacate the sentence imposed and remit the matter to County Court for resentencing.
Lahtinen, J.P, McCarthy and Egan Jr., JJ, concur.
Ordered that the judgment is modified, on the law, by vacating the sentence imposed; matter remitted to the County Court of Essex County for resentencing; and, as so modified, affirmed.
. Defendant’s challenge to the legality of his sentence survives his appeal waiver (see People v Smith, 93 AD3d 955, 956 [2012], lv denied 19 NY3d 977 [2012]; People v Tyler K, 75 AD3d 666, 666 [2010]).
. Here, defendant was convicted of a sex felony and the appropriate *18sentence for a class E felony sex offense is a determinate prison term of at least IV2 years and no more than 4 years, plus a period of postrelease supervision (see Penal Law § 70.80 [4] [a] [iv]; [9]).
. We note that this Court has, on at least one occasion, implicitly sanctioned the imposition of an indeterminate sentence upon a youthful offender who had committed a felony sex offense (People v Tyler E., 75 AD3d at 666). In People v Tyler E. (supra), the defendant pleaded guilty to two counts of criminal sexual act in the second degree and received consecutive sentences of IV3 to 4 years and 1 to 3 years. On appeal, the defendant challenged the legality of those sentences, arguing that the effect of imposing consecutive sentences was a term of imprisonment that exceeded four years, in violation *19of Penal Law § 60.02 (2) (id.). This Court agreed and ordered that the sentences run concurrently to one another (id.).