In order to participate in the pilot program and be eligible to receive payments for any period under subsection (d) of this section, a State (during such period) must have a plan, approved by the Commissioner of Social Security as meeting the requirements of this section, which provides medical and social services for severely handicapped individuals whose earnings are above the level which ordinarily demonstrates an ability to engage in substantial gainful activity and who are not receiving benefits under section
1382 or
1382h of this title or assistance under a State plan approved under section
1396a of this title, and which—