Let $K$ be a field and $L = K(x, y)$, where $x$ is transcendental over $K$ and $y$ is such that $f(x, y) = 0$, for $f \in K[X, Y]$ irreducible. I have to prove that if $f$ is also irreducible over $\overline{K}[X, Y]$, where $\overline{K}$ is the algebraic closure of $K$, then $K$ is algebraically closed in $L$, i.e., if $g(x, y)/h(x, y) \in L$ is algebraic over $K$, then $g(x, y)/h(x, y) \in K$.
Does anyone have any hint? Thanks.