Mass of first body = m;
Mass of second body = 4m and KE$_1$ = KE$_2$.
Linear momentum of a body
p=$\sqrt{2mE} \sqrt m .$
Therefore $\frac{p_1}{p_2}=\sqrt{\frac{m_1}{m_2}}=\sqrt{\frac{m}{4m}}=\sqrt{\frac{1}{4}}=\frac{1}{2}$
or $p_1:p_2 = 1: 2.$
The output (Y) of the given logic implementation is similar to the output of an/a …………. gate.