Consider a quadratic form $\displaystyle f(x,y) = ax^2 + bxy + cy^2$ with $\displaystyle a,b,c \in \mathbb{Z}$ and discriminant $\displaystyle D = b^2 - 4ac$

We know that f factors as a product of linear forms $\displaystyle (ux+vy)(u'x+v'y)$ with rational coefficients if and only if D is a square.

Under which conditions for $\displaystyle a,b,c$ are $\displaystyle u,v,u',v' \in \mathbb{Z}$?