340. Solve the systems of equations:
a) $\left\{\begin{array}{l}x+y+x y=5, \\ x y(x+y)=6 ;\end{array}\right.$
b) $\left\{\begin{array}{l}x^{3}+y^{3}+2 x y=4, \\ x^{2}-x y+y^{2}=1 .\end{array}\right.$
$\triangle$ a) Let's introduce the main symmetric polynomials $u$ and $v$. We obtain:

$$
u+v=5, \quad u v=6
$$

We find the solutions to the last system of equations:

$$
u_{1}=2, \quad v_{1}=3 ; \quad u_{2}=3, \quad v_{2}=2
$$

Returning to the variables $x$ and $y$, we will have two systems of equations:

$$
\left\{\begin{array} { l } 
{ x + y = 2 , } \\
{ x y = 3 }
\end{array} \text { and } \left\{\begin{array}{l}
x+y=3 \\
x y=2 .
\end{array}\right.\right.
$$

The first one has no solutions, while the solutions to the second are the pairs $(2 ; 1)$ and $(1 ; 2)$.
b) We apply the formulas expressing $x^{2}+y^{2}$ and $x^{3}+y^{3}$ in terms of $u$ and $v$:

$$
u^{3}-3 u v+2 v=4, \quad u^{2}-3 v=1
$$

From the second equation of this system, we express $v$ in terms of $u: v=\frac{u^{2}-1}{3}$. Substituting this expression into the first equation:

$$
\begin{gathered}
u^{3}-\left(u^{2}-1\right) u+\frac{2}{3}\left(u^{2}-1\right)=4 \\
3 u+2 u^{2}-2=12 \\
2 u^{2}+3 u-14=0
\end{gathered}
$$

From this, we get:

$$
u_{1}=2, \quad u_{2}=-\frac{7}{2} ; \quad v_{1}=1, \quad v_{2}=\frac{15}{4}
$$

It remains to solve the systems of equations:

$$
\left\{\begin{array} { l } 
{ x + y = 2 , } \\
{ x y = 1 }
\end{array} \quad \text { and } \left\{\begin{array}{l}
x+y=-\frac{7}{2} \\
x y=\frac{15}{4}
\end{array}\right.\right.
$$

The first one has the solution $(1 ; 1)$, while the second has no solutions.

Answer: a) $(2 ; 1),(1 ; 2) ; b)(1 ; 1)$.