; or (ii) substantially all of the assets of, or substantially all of the properties constituting a trade or business of, a domestic partnership; and (B) after the acquisition, either— (i) more than 50 percent of the stock (by vote or value) of the entity is held— (I) in the case of an acquisition with respect to a domestic corporation, by former shareholders of the domestic corporation by reason of holding stock in the domestic corporation; or (II) in the case of an acquisition with respect to a domestic partnership, by former partners of the domestic partnership by reason of holding a capital or profits interest in the domestic partnership