Describe a polynomial-time algorithm to determine whether an instance of CIRCUIT SAT is a "yes" instance when the circuit in question consists of a layer of AND gates followed by a layer of OR gates. Inputs are connected to AND gates and the output gate is an OR gate.