Problem

Source: Belarusian National Olympiad 2023

Tags: algebra



In every cell of the table $3 \times 3$ a monomial with a positive coefficient is written (cells (1,1); (2,3); (3,2) have the degree of two, cells (1,2);(2,1);(3,3) have a degree of one, cells (3,1);(2,2);(1,3) have a constant). Vuga added up monomials in every row and got three quadratic polynomials. It turned out that exactly $N$ of them have real roots. Leka added up monomials in every column and got three quadratic polynomials. It turned out that exactly $M$ of them have real roots. Find the maximum possible value of $N-M$.