不等式 $\left(\frac{1}{2}-x\right)\left(\frac{1}{3}-x\right)>0$ 的解集是
A. $\left\{x \left\lvert\, \frac{1}{3} < x < \frac{1}{2}\right.\right\}$
B. $\left\{x \left\lvert\, x>\frac{1}{2}\right.\right\}$
C. $\left\{x \left\lvert\, x < \frac{1}{3}\right.\right\}$
D. $\left\{x \left\lvert\, x < \frac{1}{3}\right.\right.$ 或 $\left.x>\frac{1}{2}\right\}$