Problem

Source: Germany 2017, Problem 1

Tags: quadratics, system of equations, equation, quadratic equation, algebra, algebra proposed, Germany



Given two real numbers $p$ and $q$, we study the following system of equations with variables $x,y \in \mathbb{R}$: \begin{align*} x^2+py+q&=0,\\ y^2+px+q&=0. \end{align*}Determine the number of distinct solutions $(x,y)$ in terms of $p$ and $q$.