had no present ownership interest in a principal residence during the 3-year period ending on the date of the purchase of the principal residence to which this section applies. (2) Principal residence The term principal residence has the same meaning as when used in section 121. (3) Economically distressed community (A) In general The term economically distressed community means any area identified as an economically distressed community for purposes of this section by the Secretary of Housing and Urban Development. (B) Factors to be taken into account For purposes of identifying areas as economically distressed communities for purposes of this section, the Secretary of Housing and Urban Development shall take into account the following: (i) Percent of the population in such area which has attained age 25 and is without a high school degree. (ii) Percent of habitable housing in such area that is unoccupied, excluding properties that are for seasonal, recreational, or occasional use. (iii) Percent of the population in such area which has attained age 16 and is not currently employed. (iv) Percent of population in such area which is living under the poverty line. (v) Ratio of such area’s median income to the median income of the State in which such area is located. (vi) Percent change in the number of employed individuals in such area in 2013 compared to 2010. (vii) Percent change in the number of business establishments in such areas in 2013 compared to 2010. (viii) Such other factors as such Secretary determines appropriate. (4) Purchase (A) In general The term purchase means any acquisition, but only if— (i) the property is not acquired from a person related to the person acquiring such property (or, if married, such individual’s spouse), and (ii) the basis of the property in the hands of the person acquiring such property is not determined— (I) in whole or in part by reference to the adjusted basis of such property in the hands of the person from whom acquired, or (II) under section 1014(a) (relating to