JUSTICE STEVENS delivered the opinion of the Court.At issue in this case are the meaning and validity of § 1903(f) of the Social Security Act, 81 Stat. 898, as amended, 42 U.S.C. § 1396b(f).  As applied in Massachusetts, that provision results in a distribution of Medicaid benefits to recipients of Supplemental Security Income (SSI) -- a class of aged, blind, or disabled persons who lack sufficient income to meet their basic needs -- that is more generous than the distribution of such benefits to persons who are self-supporting.  Appellees are members of the latter class.  Because they must incur medical expenses -- for which they are never reimbursed -- before they become eligible for Medicaid, they have less income available for their nonmedical needs than the recipients of SSI.  The District Court concluded that this discrimination was irrational, and held that § 1903(f) was unconstitutional.  Hogan v. Harris, 501 F. Supp. 1129 (Mass.1980).  We disagree, and reverse.The statutory provisions governing the Medicaid program are complex.  See 42 U.S.C. § 1396 et seq. (1976 ed. and Supp. IV).  We first consider the history of the specific provisions at issue in this case, then relate the circumstances that gave rise to the present controversy, and finally address the two legal issues that are presented.ISection 1903(f) of the Social Security Act (Act) was enacted in 1968.  To understand the present controversy, however, it is necessary to consider amendments to the Act made in 1965, 1967, and 1972.AThe Medicaid program was established in 1965 in Title XIX of the Act"for the purpose of providing federal financial assistance to States that choose to reimburse certain costs of medical treatment for needy persons."Harris v. McRae, 448 U. S. 297,  448 U. S. 301.  Section 1902(a)(10) of the Act, 42 Page 457 U. S. 572 U.S.C. § 1396a(a)(10), sets forth the basic scope of the program, which has not changed significantly from its enactment in 1965.  See 79 Stat. 345.  Participating States are required to provide Medicaid coverage to certain individuals -- now described as the "categorically needy"; at their option, States also may provide coverage (and receive partial federal reimbursement) to other individuals -- described as the "medically needy."  See Schweiker v. Gray Panthers, 453 U. S. 34,  453 U. S. 37. [Footnote 1]  These classes are defined by reference to other federal assistance programs.In 1965, federal assistance programs existed for the aged, the blind, the disabled, and families with dependent children. [Footnote 2]  At that time, each of these programs was administered by the States, which established both the "standard of need" and the "level of benefits."  See Jefferson v. Hackney, 406 U. S. 535; Rosado v. Wyman, 397 U. S. 397. [Footnote 3]  In establishing the Medicaid program, Congress required participating States to provide medical assistance to individuals who received cash payments under one of these assistance programs.  79 Stat. 345, as amended, 42 U.S.C. § 1396a(a) (10)(A).  The House Report explained:  "These people are the most needy in the country, and it is appropriate for Page 457 U. S. 573 medical care costs to be met, first, for these people." [Footnote 4]  They are the "categorically needy."Congress also provided that a participating State could offer Medicaid benefits to individuals who fell within one of the categories for which federal assistance was available but whose income made them ineligible for aid under those programs.  These individuals were deemed "less needy," [Footnote 5] and could receive assistance only if their income and resources were insufficient "to meet the costs of necessary medical or remedial care and services."  79 Stat. 345, as amended, 42 U.S.C. § 1396a(a)(10)(C).  In 1965, no limit was placed on the extent to which federal reimbursement was available for optional coverage that States elected to provide to these persons who might become "medically needy." [Footnote 6] Page 457 U. S. 574Since States established the income limits for the categorical assistance programs, they also established the income limits for the "categorically needy" under the Medicaid program.  In addition, participating States established the eligibility standards for the optional coverage provided to the "medically needy."  In § 1902(a)(17) of the Act, 42 U.S.C. § 1396a (a)(17), however, Congress set forth certain requirements governing state standards for determining eligibility.  In particular, Congress required States to"provide for flexibility in the application of such standards with respect to income by taking into account, except to the extent prescribed by the Secretary, the costs (whether in the form of insurance premiums or otherwise) incurred for medical care or any other type of remedial care recognized under State law."79 Stat. 346; see 42 U.S.C. § 1396a(a)(17). [Footnote 7] Page 457 U. S. 575Most States promptly elected to participate in the Medicaid program. [Footnote 8]  Many of these States also chose to provide Medicaid coverage to the "medically needy."  Within a year, Congress recognized that it was fiscally improvident to rely exclusively on the States to set income limits for both aspects Page 457 U. S. 576 of the Medicaid program.  See H.R.Rep. No. 2224, 89th Cong., 2d Sess., 1-3 (1966).  It cautioned States "to avoid unrealistic levels of income and resources for title XIX eligibility purposes."  Id. at 3.BIn 1967, Congress placed a limit on federal participation in the Medicaid program.  Representative Mills introduced a bill, sponsored by the Johnson administration, that would have made significant changes in both the Medicaid program and the categorical assistance programs.  H.R. 5710, 90th Cong., 1st Sess. (1967).  Under § 220 of H.R. 5710, a State participating in the Medicaid program would have been entitled to receive federal financial assistance for providing Medicaid benefits only to those persons whose income, after deduction of incurred medical expenses, was less than 150% of the highest of the State's categorical assistance standards of need. [Footnote 9]  Section 202 of the bill would have required States to revise annually the standards of need under each of the categorical assistance programs to reflect changes in the costs of living and, in some circumstances, to pay 100% of the standard of need established under the programs.  In support of this provision, the Secretary of the Department of Health, Education, and Welfare explained that"33 States provide less support for needy children [under the AFDC program] than the standards the States themselves have set as necessary to meet basic human needs. [Footnote 10] "Page 457 U. S. 577After extensive consideration, the House Ways and Means Committee reported out a substantially revised bill. H.R. 12080, 90th Cong., 1st Sess. (1967).  The Committee Report described its primary proposed limitation on federal participation:"our committee is proposing . . . that Federal sharing will not be available for families whose income exceeds 133 1/3% percent of the highest amount ordinarily paid to a family of the same size (without any income and resources) in the form of money payments under the AFDC program.  (AFDC income limits are, generally speaking, the lowest that are used in the categorical assistance programs)."1967 House Report at 119.  As noted, see n 10, supra, the amount of benefits paid in many States was less than the qualifying standard of need. [Footnote 11]  The Committee Report explained the reasons for the move to limit federal participation in the Medicaid program.  After noting that a few States had provided benefits beyond that anticipated by Congress, it stated:"Your committee expected that the State plans submitted under title XIX would afford better medical care and services to persons unable to pay for adequate care.  Page 457 U. S. 578 It neither expected nor intended that such care would supplant health insurance presently carried or presently provided under collective bargaining agreements for individuals and families in or close to an average income range.  Your committee is also concerned that the operation of some State plans may greatly reduce the incentives for persons aged 66 or over to participate in the supplementary medical insurance program [Medicare] of title XVIII of the Social Security Act, which was also established by the Social Security Amendments of 1965.  The provisions of the bill are directed toward eliminating, insofar as Federal sharing is concerned, these clearly unintended and, in your committee's judgment, undesirable actual and potential effects of the legislation."Id. at 118.  In States that paid less than 75% of the AFDC standard of need, the House provision would have provided Medicaid benefits only to persons whose income, after deduction of incurred medical expenses, was less than the AFDC standard of need. [Footnote 12]The Committee proposal was severely criticized on the House floor. [Footnote 13]  It nevertheless was passed by the House and Page 457 U. S. 579 sent to the Senate. [Footnote 14]  The Senate returned a substantially different bill, and the matter was referred to conference. [Footnote 15]The Conference Committee adopted the House 133 1/3% Page 457 U. S. 580 AFDC payment standard.  H.R.Conf.Rep. No. 1030, 90th Cong., 1st Sess., 63 (1967).  It added, however, an express exception for the categorically needy.  Ibid.  Opposition to the Conference proposal was voiced in both the House and the Senate. [Footnote 16]  The 133 1/3% AFDC payment standard nevertheless was approved by Congress and enacted into law as § 1903(f) of the Social Security Act.  See 81 Stat. 898, as amended, 42 U.S.C. § 1396b(f). [Footnote 17] Page 457 U. S. 581CIn 1972, Congress replaced three of the four state-administered categorical assistance programs with a new federal program entitled Supplemental Security Income for the Aged, Blind, and Disabled (SSI), 42 U.S.C. § 1381 et seq. (1976 ed. and Supp. IV). [Footnote 18]  The SSI program establishes a federally Page 457 U. S. 582 guaranteed minimum income for the aged, blind, and disabled.  See Schweiker v. Wilson, 450 U. S. 221,  450 U. S. 223.  Under the program, however, the States may (and in some cases must) raise that minimum standard and supplement the benefits provided by the Federal Government.  See 42 U.S.C. § 1382e (1976 ed. and Supp. IV).  Moreover, if supplemental payments are made to persons who would be eligible for SSI benefits except for the amount of their income, the State also may provide Medicaid benefits to those persons.  See 42 U.S.C. § 1396a(a)(10)(C)(ii). [Footnote 19]IIThe Commonwealth of Massachusetts has chosen to participate in the Medicaid program and to provide benefits -- to the extent that federal financial assistance is available -- to the "medically needy."  The State also has elected to make supplementary payments to individuals who are eligible for SSI benefits or who would be eligible except for their income.  Finally, the State has chosen to provide Medicaid benefits to those persons who receive supplemental payments.  In Massachusetts, 133 1/3% of the appropriate state AFDC Page 457 U. S. 583 payment amount is less in some cases than the combined federal SSI and state supplementary payment level. [Footnote 20]Appellees filed this suit in 1980 in federal court, contending that § 1903(f) of the Act -- as applied in Massachusetts -- violates the equal protection component of the Fifth Amendment. [Footnote 21]  Each of the appellees is either aged, blind, or disabled, but they are not categorically needy.  For each appellee or his spouse was employed at one time and paid "Social Security" taxes.  Each appellee (or his spouse) currently receives Social Security benefits (Federal Old-Age, Survivors, and Disability Insurance, 42 U.S.C. § 401 et seq. (1976 ed. and Supp. IV)) in an amount that renders him ineligible for either SSI benefits or state supplementary payments.  Appellees challenged the fact that, since 133 1/3% of the Massachusetts AFDC payment level is for them lower than the SSI payment level, they are ineligible for Medicaid until their income, after deduction of incurred medical expenses, is less than that of SSI payment recipients.  By reason of the Social Security benefits that they receive, appellees thus have less income available for nonmedical expenses than individuals who -- possibly because they never worked and receive no Social Security benefits -- are dependent upon public assistance for support. [Footnote 22] Page 457 U. S. 584The District Court granted appellees' motion for partial summary judgment. [Footnote 23]  It ruled that the Massachusetts Medicaid program was unconstitutional insofar as it forced Social Security recipients to incur medical expenses that reduced their remaining income to an amount below SSI payment levels.  The court later declared explicitly that § 1903(f) of the Act, 42 U.S.C. § 1396b(f), is unconstitutional as applied in Massachusetts.  App. to Juris.Statement 25a.  We noted probable jurisdiction.  454 U.S. 891.IIIIn this Court, for the first time, appellees contend that the Social Security Act itself compels the conclusion that, if Medicaid services are provided to the "medically needy," those persons may not be forced to incur medical expenses that Page 457 U. S. 585 would reduce their remaining income below the applicable public assistance standard.  Although appellees did not advance this argument in the District Court, they are not precluded from asserting it as a basis on which to affirm that court's judgment. [Footnote 24]"Where a party raises both statutory and constitutional arguments in support of a judgment, ordinarily we first address the statutory argument in order to avoid unnecessary resolution of the constitutional issue."Blum v. Bacon, ante at  457 U. S. 137.  See Harris v. McRae, 448 U.S. at  448 U. S. 306-307.Appellees contend that a"fundamental Congressional purpose in the creation of the medically needy feature of Title XIX was to achieve equity between public assistance recipients and others similarly situated."Brief for Appellees 12.  In support of this contention, appellees cite the requirement first imposed in 1965 that States"include reasonable standards (which shall be comparable for all groups) for determining eligibility for and the extent of medical assistance under the plan . . . ,"79 Stat. 346 (emphasis added), as amended, 42 U.S.C. § 1396a(a)(17), and note the statements in the legislative history that a State could not require an individual to use, for medical expenses, income "which would bring the individual below the test of eligibility under the State plan."  See n 7, supra.Moreover, appellees contend that this "comparability requirement" was not changed by the enactment of § 1903(f) in 1968.  Appellees argue that the separate bills passed in both the House and the Senate would have affected both the categorically and the medically needy. [Footnote 25]  Only when the Conference Page 457 U. S. 586 Committee accepted the House provision and added an exception for the categorically needy, appellees argue, did the 1968 modification potentially change the comparability requirement between the two groups.  Appellees assert that such a change was not intended; rather, they argue that the exception for the categorically needy was added only to ensure that they would not be adversely affected by § 1903(f).  Appellees assert that the medically needy were not similarly excepted from the 133 1/3% rule in those States in which that figure was less than the applicable standard of need because, in 1967, those States did not have medically needy programs.Thus, appellees urge that we construe § 1903(f) to require the medically needy to incur medical expenses until their income is 133 1/3% of the AFDC payment amount or -- to maintain comparability -- 100% of the combined SSI-state supplementary payment level if that figure is higher.  Appellees argue that the legislative history of the 1965 and 1967 Amendments to the Social Security Act justifies a departure from the literal language of § 1903(f) and the Secretary's interpretation of that provision.We cannot agree.  Congress explicitly stated in § 1903(f) that federal reimbursement for benefits provided to the medically needy was available only if the income of those persons, after the deduction of incurred medical expenses, was less than 133 1/3% of the state AFDC payment level.  In specifically excepting the categorically needy from this rule, Congress recognized that this amount could be lower than categorical assistance eligibility levels.  There is no basis in either the statute or the legislative history for appellees' argument that Congress implicitly "assumed" that those States in which 133 1/3% of the AFDC payment level was less than the applicable standard of need simply would not provide assistance to the medically needy.  Even if this were Page 457 U. S. 587 true in 1967, the Medicaid program then was less than two years old; Congress was aware that many States were in the process of adopting Medicaid programs. [Footnote 26]  To assume that Congress was unaware that § 1903(f) -- which applied only to the medically needy -- could operate in those States -- which Congress knew existed -- in which 133 1/3% of the AFDC payment amount was less than the applicable standard of need is to demean the intelligence of the Congress.  We are not prepared to interpret a statute on the basis of an unsupported assumption that Congress had little idea of what it was doing. [Footnote 27]The literal and clear language of § 1903(f) does not conflict with any other provision of the Act.  In both § 1902(a)(10) and § 1902(a)(17), see 79 Stat. 345-346, Congress required comparability among the various "categories" for which federal assistance was available, but these provisions did not require that the medically needy be treated comparably to the categorically needy in all respects.  See n 6, supra. [Footnote 28]  Indeed, Page 457 U. S. 588 such a broad comparability requirement would be inconsistent with the fact that Congress provided in 1965 that the medically needy could be excluded entirely from the Medicaid program.  Moreover, § 1903(f) is not inconsistent with the congressional intent, see n 7, supra, that medical expenses be considered in determining, where appropriate, an individual's eligibility for Medicaid.  In § 1903(f), Congress determined that federal assistance would not be available for payments made to individuals whose income, after deduction of incurred medical expenses, was greater than 133 1/3% of applicable state AFDC payments.  Congress determined that, so long as an individual retained that level of income to meet basic needs, he need not receive reimbursement for medical expenses.  That income level might appear unreasonably low, but it is the level that Congress chose.  We find no inconsistency between § 1903(f) and § 1902(a)(17).In sum, we see no reason to ignore the literal language of § 1903(f).  Moreover, this analysis is consistent with the Secretary's interpretation of that statutory provision."We have often noted that the interpretation of an agency charged with the administration of a statute is entitled to substantial deference."Blum v. Bacon, ante at  457 U. S. 141.  We hold that the discrimination challenged in this case is required by the Social Security Act.IVAppellees also contend -- and the District Court held -- that § 1903(f), as applied in Massachusetts, irrationally discriminates between the categorically and the medically needy. [Footnote 29]  Page 457 U. S. 589 The unfairness of the statute stems from the fact that appellees receive less medical assistance, and have less income remaining for their nonmedical needs, than do SSI recipients.  The unfairness is accentuated by the fact that the disfavored class consists largely of persons who worked and paid taxes to provide for their retirement, while the favored class includes persons who may never have done so.  Powerful equities unquestionably support the appellees' claim of unfair treatment.A belief that an Act of Congress may be inequitable or unwise is, of course, an insufficient basis on which to conclude that it is unconstitutional.  Moreover, the validity of a broad legislative classification is not properly judged by focusing solely on the portion of the disfavored class that is affected most harshly by its terms.  Califano v. Jobst, 434 U. S. 47.  In this case, Congress has differentiated between the categorically needy -- a class of aged, blind, disabled, or dependent persons who have very little income -- and other persons with similar characteristics who are self-supporting.  Members of the former class are automatically entitled to Medicaid; members of the latter class are not eligible unless a State elects to provide benefits to the medically needy and unless their income, after consideration of medical expenses, is below state standards of eligibility. [Footnote 30]According to the congressional scheme, then, the medically needy may be excluded entirely from the Medicaid program.  Before considering the constitutional constraints that may exist if a State chooses to provide benefits to that class, it is appropriate to confront the more basic question whether the Page 457 U. S. 590 optional character of the program for the medically needy is itself constitutionally permissible.In establishing public assistance programs, Congress often has determined that the Federal Government cannot finance a program that provides meaningful benefits in equal measure to everyone.  Both federal and state funds available for such assistance are limited.  In structuring the Medicaid program, Congress chose to direct those limited funds to persons who were most impoverished and who -- because of their physical characteristics -- were often least able to overcome the effects of poverty.  The legislative history of the 1965 Amendments makes clear that this group was not chosen for administrative convenience.  "These people are the most needy in the country, and it is appropriate for medical care costs to be met, first, for these people." [Footnote 31]  A decision to allocate medical assistance benefits only to the poor does not, itself, violate constitutional principles of equality; in terms of their ability to provide for essential medical services, the wealthy and the poor are not similarly situated, and need not be treated the same.  It is rational to distribute public assistance benefits on the basis of the income and resources available to potential recipients.In choosing to require coverage only for the categorically needy, Congress permitted States to exclude from the program many persons who -- by reason of large medical expenses -- often were just as much in need of medical assistance as the categorically needy.  Yet Congress found these persons "less needy."  1965 House Report at 66.  By reason of the greater income available to them, as a class, these persons generally are better able to provide for their medical needs.  In the legislative history of the 1967 Amendments, see supra at  457 U. S. 577-580, and n. 14, Congress noted that these persons often are able to prepare for future medical expenses Page 457 U. S. 591 through private insurance or through participation in the Medicare program.In Fullington v. Shea, 404 U.S. 963, this Court affirmed a decision of a three-judge District Court holding that it was constitutional for the State of Colorado to provide benefits to the categorically needy but not to the medically needy.  We decided Fullington summarily.  It is clear that a decision to allocate scarce assistance benefits on the basis of an assumption that persons with greater incomes generally are better able to prepare for future medical needs is not inconsistent with constitutional principles of equal treatment.  In other words, it is rational to define need on the basis of income, even though some persons with greater income -- who have been unable or unwilling to save enough of their earnings to prepare for future medical needs -- may actually be in greater need of assistance than those with less gross income.  Although some "medically needy" persons have less income available for nonmedical expenses than those who receive categorical assistance, the broad legislative classification does not involve the type of arbitrariness that is constitutionally offensive. [Footnote 32]Appellees do not challenge the decision in Fullington.  They do not contend that it is irrational to deny benefits entirely to the medically needy.  Thus, they do not challenge the line drawn by Congress to separate the class that receives favored treatment from the class that does not.  Appellees attack only the manner in which one of the separate Page 457 U. S. 592 classes is affected by the program.  They argue that, if medical benefits are made available to a class of persons who are not categorically needy, it is constitutionally impermissible to deny them benefits if their income, after the deduction of incurred medical expenses, is lower than that of an individual who receives public assistance.In view of the unchallenged decision in Fullington, appellees' constitutional argument is self-defeating.  The injury that they regard as inconsistent with constitutional principles of equal treatment could be avoided by denying them all Medicaid benefits, thus placing them in a worse position financially than they are in now.  No interest in "equality" could be furthered by such a result.  If a State may deny all benefits to the medically needy -- while providing benefits to the categorically needy and rendering some persons who are on public assistance better off than others who are not -- a State surely may narrow the gap between the two classes by providing partial benefits to the medically needy, even though certain members of that class may remain in a position less fortunate than those on public assistance.The validity of the distinction between the categorically needy and the medically needy is not undermined by § 1903(f), because the impact of that provision falls entirely on persons who are not within the categorically needy class.  See n 30, supra.  The function of the 133 1/3% AFDC payment rule is to place a limit on the availability of reimbursement for potential members of the "medically needy" class.  That rule prevents some persons (although not the appellees) from qualifying as medically needy; it also determines the extent to which the medically needy are reimbursed for their medical expenses.  Yet appellees do not challenge the fact that, among persons who do not receive public assistance, some are treated differently from others.  In other words, they do not complain of any discrimination within the class (all persons who are not categorically needy) Page 457 U. S. 593 in which the rule performs its entire function. [Footnote 33]  Nor do they argue that Congress chose an eligibility level that is unrelated to ability to provide for medical needs.The fact that Massachusetts, unlike the State of Colorado in Fullington, has provided Medicaid benefits to the medically needy -- and, in doing so, has defined eligibility for persons who are not categorically needy on the basis of incurred medical expenses -- does not force it to make immediate medical need the sole standard in its entire Medicaid program.  Massachusetts, in essence, has determined that those individuals whose gross income is greater than public assistance levels are ineligible for Medicaid unless medical expenses in any computation period reduce available income to 133 1/3% of the state AFDC payment level.  By adding the qualifying clause, which the State of Colorado did not, Massachusetts did not offend any constitutional interest in equality.  Accordingly, without endorsing the wisdom of the particular standard that Congress selected -- a matter that is not for us to consider -- we conclude that it violates no constitutional command.  The judgment of the District Court is reversed.  The case is remanded for further proceedings consistent with this opinion.It is so ordered
U.S. Supreme CourtSchweiker v. Hogan, 457 U.S. 569 (1982)Schweiker v. HoganNo. 81-213Argued March 24, 1982Decided June 21, 1982457 U.S. 569SyllabusSection 1903(f) of the Social Security Act provides that federal reimbursement to States electing to provide Medicaid benefits to the "medically needy" is available only if the income of those persons, after deduction of incurred medical expenses, is less than 133 1/3% of the state Aid to Families With Dependent Children (AFDC) payment level.  Section 1903(f) specifically excepts from this rule the "categorically needy" -- those receiving Supplemental Security Income (SSI) because of lack of income to meet their basic needs.  As applied in Massachusetts, § 1903(f) results in a distribution of Medicaid benefits to recipients of SSI that is more generous than the distribution of such benefits to persons who are self-supporting.  Appellees, each of whom (or his spouse) receives Social Security benefits in an amount that renders him ineligible for either SSI benefits or state supplementary payments, filed suit in Federal District Court, alleging that § 1903(f), as applied in Massachusetts, violates the equal protection component of the Fifth Amendment.  Appellees asserted that, since 133 1/3% of the Massachusetts AFDC payment level is for them lower than the SSI payment level, they are ineligible for Medicaid until their income, after deduction of incurred medical expenses, is less than that of SSI payment recipients, and that, because of the Social Security benefits which they receive, appellees thus have less income available for nonmedical expenses than individuals who -- possibly because they never worked and receive no Social Security benefits -- are dependent upon public assistance for support.  The District Court entered judgment for appellees.Held:1. There is no merit to appellees' contention that the Social Security Act itself compels the conclusion that, if Medicaid services are provided to the "medically needy," those persons may not be forced to incur medical expenses that would reduce their remaining income below the applicable public assistance standard.  The legislative history of the Medicaid provisions of the Act does not justify a departure from the literal and clear language of § 1903(f).  Nor does 1903(f)'s literal language conflict with any other provision of the Act.  Moreover, adherence to that section's Page 457 U. S. 570 language is consistent with its interpretation by the Secretary of Health and Human Services.  Thus, the discrimination challenged in this case is required by the Social Security Act.  Pp.  457 U. S. 584-588.2. As applied in Massachusetts, § 1903(f) does not violate constitutional principles of equal treatment.  While powerful equities support appellees' claim of unfair treatment insofar as they receive less medical assistance and have less income remaining for their nonmedical needs than do SSI recipients, a belief that an Act of Congress may be inequitable or unwise is an insufficient basis on which to conclude that it is unconstitutional.  The optional character of the congressional scheme -- whereby participating States must provide Medicaid benefits to the categorically needy but may elect not to provide any benefits at all to the medically needy -- does not itself violate constitutional principles of equality.  Since a State may deny all benefits to the medically needy -- while providing benefits to the categorically needy and rendering some persons who are on public assistance better off than others who are not -- it may narrow the gap between the two classes by providing partial benefits to the medically needy even though certain members of that class may remain in a position less fortunate than those on public assistance.  The fact that Massachusetts has provided Medicaid benefits to the medically needy does not force it to make immediate medical need the sole standard in its entire Medicaid program.  Pp.  457 U. S. 588-593.501 F. Supp. 1129, reversed and remanded.STEVENS, J., delivered the opinion for a unanimous Court. Page 457 U. S. 571