; and (B) withdrawn from— (i) all forms of entry, appropriation, or disposal under the public land laws; (ii) location, entry, and patent under the mining laws; and (iii) disposition under all laws relating to mineral and geothermal leasing or mineral materials. (4) Contracts and permits Before adjusting the boundary under paragraph (2), the Secretary or the Secretary of Agriculture, as applicable, shall, with respect to any contract or permit on land affected by the agreement entered into under paragraph (1)— (A) allow the contract or permit to expire at the end of the period of performance of the contract or permit; or (B) modify the contract or permit to exclude the portion of the land covered by the agreement. (5) Rights-of-way and easements Any right-of-way or easement with respect to land transferred to the Secretary or the Secretary of Agriculture under the agreement entered into under paragraph (1) shall be transferred to the Secretary or the Secretary of Agriculture, as applicable. (g) Unmanned aircraft (1) In general Except as provided in paragraph (2), launching, landing, or operating an unmanned aircraft is prohibited within the boundaries of the Bandelier National Park and Preserve. (2) Authorized use (A) In general Subject to subparagraph (B), the Secretary may permit the use of an unmanned aircraft for— (i) administrative purposes, including— (I) scientific study; (II) search and rescue operations; (III) fire operations; (IV) law enforcement; or (V) other administrative purposes, as determined by the Secretary; or (ii) activities conducted under an applicable— (I) scientific research or collecting permit; or (II) special use permit that specifically authorizes launching, landing, or operating the unmanned aircraft. (B) Limitation The Secretary may not permit the use of an unmanned aircraft under subparagraph (A) if the use would cause an unacceptable impact to the resources or values of the National Park or the National Preserve, as determined by the Secretary.