or land. (B) Land and building acquisition costs Amounts paid or incurred for the acquisition of buildings or land shall be included under paragraph (A) only if paid or incurred not more than 3 years before the date on which the allocation referred to in subparagraph (A) is made. If the taxpayer acquired any building or land from an entity (or any related party to such entity) that holds an ownership interest in the taxpayer, then such entity must also have acquired such property within such 3-year period, and the acquisition cost included under subparagraph (A) with respect to the taxpayer shall not exceed the amount such entity paid or incurred to acquire such property. (c) Qualified residence For purposes of this section— (1) In general The term qualified residence means a residence that— (A) is real property affixed on a permanent foundation, (B) is— (i) a house which is comprised of 4 or fewer residential units, (ii) a condominium unit, or (iii) a house or an apartment owned by a cooperative housing corporation (as defined in section 216(b)), (C) is part of a qualified project with respect to which the neighborhood homes credit agency has made an allocation under subsection (e), and (D) is located in a qualified census tract (determined as of the date of such allocation). (2) Qualified census tract (A) In general The term qualified census tract means a census tract— (i) which— (I) has a median family income which does not exceed 80 percent of the median family income for the applicable area, (II) has a poverty rate that is not less than 130 percent of the poverty rate of the applicable area, and (III) has a median value for owner-occupied homes that does not exceed the median value for owner-occupied homes in the applicable area, (ii) which— (I) is located in a city which has a population of not less than 50,000 and such city has a poverty rate that is not less than 150 percent of the poverty rate of the applicable area, (II) has a median family income which does not exceed the median family income for the