(A) the first $240 per year (or proportionately smaller amounts for shorter periods) of income (whether earned or unearned) other than income which is paid on the basis of the need of the eligible individual, and
(B) monthly (or other periodic) payments received by any individual, under a program established prior to July 1, 1973 (or any program established prior to such date but subsequently amended so as to conform to State or Federal constitutional standards), if (i) such payments are made by the State of which the individual receiving such payments is a resident, (ii) eligibility of any individual for such payments is not based on need and is based solely on attainment of age 65 or any other age set by the State and residency in such State by such individual, and (iii) on or before September 30, 1985 , such individual (I) first becomes an eligible individual or an eligible spouse under this title, and (II) satisfies the twenty-five-year residency requirement of such program as such program was in effect prior to January 1, 1983 ;