Let $f(x)=x^{2}+p x+q$. For which $p$ and $q$ are the equalities $f(p)=f(q)=0$ satisfied?
The first method. From the condition $2 p^{2}+q=q^{2}+p q+q=0$. Hence, $2 p^{2}-p q-q^{2}=(2 p+q)(p-q)=0$.

For $p=q$, we get $2 p^{2}+p=0$, that is, $p=0$ or $p=-\frac{1}{2}$.

For $q=-2 p$, we get $2 p^{2}-2 p=0$, that is, $p=0$ or $p=1$.

The second method. Consider two cases.

1) $p$ and $q$ are different roots of the equation. Then, by Vieta's theorem, $p+q=-p, p q=q$. If $q=0$, then $p=0$, which does not correspond to the case being considered. Therefore, $p=1, q=-2$.
2) $p=q$. Then $2 p^{2}+p=0$, from which $p=q=0$ or $p=q=-\frac{1}{2}$.

## Answer

$(0,0),(-1 / 2,-1 / 2),(1,-2)$.