; and (B) submit such report to the Secretary of Homeland Security. (3) Failure to comply with standards (A) Initial failure If the Inspector General determines that a facility has failed to comply with the standards established pursuant to section 2 for the first time during any 2-year period, and such noncompliance constitutes a deficiency that threatens the health, safety, or the due process rights of detainees— (i) the Inspector General shall notify the Secretary of Homeland Security of such finding; and (ii) the Secretary shall— (I) impose a fine of not less than 10 percent of the value of the contract with a facility that is not owned by the Department of Homeland Security; and (II) if the facility is owned by the Department of Homeland Security— (aa) issue a written warning to the facility not later than 30 days after receiving such notification from the Inspector General, which shall include proposed remedial measures to be carried out not later than 60 days after the issuance of the warning; and (bb) not later than 60 days after the issuance of the warning described in subclause (I), certify to the Inspector General that the remedial measures have been carried out. (B) Subsequent failures If the Inspector General determines that a facility has failed to comply with the standards under section 2 in 2 investigations under paragraph (1) during any 2-year period, and such noncompliance constitutes a deficiency that threatens the health, safety, or due process rights of detainees— (i) the Inspector General shall notify the Secretary of Homeland Security of such finding; and (ii) the Secretary shall— (I) if the facility is not owned by the Department of Homeland Security— (aa) transfer each detainee from such facility, not later than 30 days after receiving such notification, to a facility that complies with such standards; and (bb) terminate the contract with the owner of the facility