2 1 2
YES NO Hint When $x=1$, $f(x)=2$, $f(f(x))=f(2)=3$, then $g(x)=\left\lfloor\dfrac{2+3}{2}\right\rfloor=2$, which is a prime. So the output is $\texttt{YES}$. When $x=2$, $f(x)=3$, $f(f(x))=f(3)=5$, then $g(x)=\left\lfloor\dfrac{3+5}{2}\right\rfloor=4$, which is not a prime. So the output is $\texttt{NO}$.