This paragraph shall apply to any life insurance contract—
(i)#
purchased as a part of a plan described in section 403(a), or
(ii)#
purchased by a trust described in section 401(a) which is exempt from tax under section 501(a) if the proceeds of such contract are payable directly or indirectly to a participant in such trust or to a beneficiary of such participant.