Yes, but going to a prostitute has risks of catching some kind of infection.
States where prostitution is legalized, like modern Germany, do not specifically take measures by government to control the diseases of prostitutes and people who come into contact, taking tests, and so on.
In...