A logic circuit has four input lines, $A, B, C$, and $D ; A$ represents the MSB and $D$ represents the LSB. Design a logic circuit in such a way that the output is high if the input signal is outside the midrange of the input numbers, that is, in the range $(0)_{10}$ to $(3)_{10}$ or $(12)_{10}$ to $(15)_{10}$.