; and (II) the percentage constituted by the sum of— (aa) the product of 0.85 and the ratio of the State distribution factor for the State or territory to the sum of the respective distribution factors for all States; and (bb) the product of 0.15 and the ratio of the non-local distribution factor for the State or territory (as determined under clause (iv)) to the sum of the respective non-local distribution factors for all States or territories. (ii) State distribution factor For purposes of clause (i)(II)(aa), the term State distribution factor means an amount equal to— (I) the estimated number of drug overdose deaths in the State, as determined under clause (iii); or (II) the number of non-fatal drug overdoses in the State, as determined under clause (iv); as determined by the Secretary based on which distribution factor (subclause (I) or (II)) will result in the State receiving the greatest amount of funds. (iii) Number of drug overdoses For purposes of clause (ii), the number of drug overdose deaths determined under this clause for a State for a fiscal year is the number of drug overdose deaths during the most recent 3-year period for which such data are available. (iv) Number of non-fatal drug overdoses For purposes of clause (ii), the number of non-fatal drug overdose deaths determined under this clause for State for a fiscal year for purposes of clause (ii) may be determined by using data including emergency department syndromic data, visits, or other emergency medical services for drug-related causes during the most recent 3-year period for which such data are available. (v) Non-local distribution factors For purposes of clause (i)(II)(bb), the term non-local distribution factor means an amount equal to the sum of— (I) the number of drug overdoses deaths in the State involved, as determined under clause (iii), or the number of non-fatal drug overdoses in the State, based on the criteria used by the State under clause (ii)