A=-x^2-4xy+1/2y^2,B=-2X^2+5xy-3/2y^2