; and (ii) the head of the State agency enters into a written agreement with the Secretary described in paragraph (4)(A). (E) Failure to approve or deny application If the Secretary fails to make a determination with respect to any application submitted under subparagraph (B)(i) within 180 days after the date on which the Secretary receives that application— (i) the application shall be deemed approved; and (ii) the Secretary shall— (I) notify the State that submitted the application of the approval; and (II) execute a written agreement described in paragraph (4)(A). (4) Written agreement (A) In general A written agreement referred to in paragraph (3)(D)(ii) shall— (i) be executed by the Governor or the top-ranking environmental official in the State who is charged with responsibility for environmental matters; (ii) be in such form as the Secretary may prescribe; (iii) provide that the State— (I) agrees to assume all or part of the responsibilities of the Secretary described in paragraph (2)(B); (II) expressly consents, on behalf of the State, to accept the jurisdiction of the Federal courts for the compliance, discharge, and enforcement of any responsibility of the Secretary assumed by the State; (III) certifies that State laws (including regulations) are in effect that— (aa) authorize the State to take the actions necessary to carry out the responsibilities being assumed; and (bb) are comparable to section 552 of title 5, United States Code, including providing that any decision regarding the public availability of a document under those State laws is reviewable by a court of competent jurisdiction; and (IV) agrees to maintain the financial resources necessary to carry out the responsibilities being assumed; (iv) require the State to provide to the Secretary any information the Secretary reasonably considers necessary to ensure that the State is adequately carrying out the responsibilities assigned to the State; (v) be renewable; and (vi) have a term of— (I) not more than 5 years