; or (B) a fossil fuel company that operates in the Russian Federation, except if the fossil fuel company transports oil or gas— (i) through the Russian Federation for sale outside of the Russian Federation; and (ii) that was extracted from a country other than the Russian Federation with respect to the energy sector of which the President has not imposed sanctions as of the date on which the contract is awarded. (2) Oil and gas origin For the purposes of applying the exception under paragraph (1)(B), oil and gas transported by a fossil fuel company shall be deemed to have been extracted from the location of extraction specified in the certificate of origin or other documentation confirming the origin of such oil or gas unless the person with respect to which such exception would apply knew or had reason to know that such location in such documentation was false or incorrect. (b) Exceptions (1) In general The prohibition under subsection (a) does not apply to a contract that the Secretary of Defense and the Secretary of State jointly determine— (A) is necessary— (i) for purposes of providing humanitarian assistance to the people of Russia; or (ii) for purposes of providing disaster relief and other urgent life-saving measures; (B) is vital to the military readiness, basing, or operations of the United States or the North Atlantic Treaty Organization; (C) is vital to the national security interests of the United States