2. Given the lengths of the four sides of a quadrilateral are $m$, $n$, $p$, and $q$, and they satisfy $m^{2}+n^{2}+p^{2}+q^{2}=2 m n+2 p q$. Then this quadrilateral is ( ).
(A) parallelogram
(B) quadrilateral with perpendicular diagonals
(C) parallelogram or quadrilateral with perpendicular diagonals
(D) quadrilateral with equal diagonals