# Rationality testing and algebraic functions

Let $S\subseteq\mathbb{C}$ be a finite set. A function $f:\mathbb C -S\to\mathbb C$ is said to be algebraic if it satisfies a polynomial equation $a_n(x)f(x)^n + \ldots + a_1(x) f(x) + a_0(x)=0$ for $a_i\in\mathbb{C}(x)$ rational functions.

Does there exist a funcion $f_{\alpha,\beta}(x)$ such that $f_{\alpha,\beta}$ is algebraic if and only $\alpha$ and $\beta$ are rational?

# Rational thinking

Does there exist a polynomial $p\in\mathbb{Q}[X_1,\ldots,X_n]$ such that for any $\alpha_1,\ldots,\alpha_n\in\mathbb{C}$ we have that $p(\alpha_1,\ldots,\alpha_n)\in\mathbb{Q}$ if and only if $\alpha_1,\ldots,\alpha_n\in\mathbb{Q}$?