Let n be a positive integer and let \(P(x,y)\in \mathbb {Z}[x,y]\) be a non-constant polynomial. In this paper, we prove that every S- and T-number (under some technical conditions) can be written in the form \(P(\sigma , \tau )\) for uncountable many pairs \((\sigma , \tau )\) of \(U_n\)-numbers.