If your sexual intercourse were protected all the time, there is no need of getting tested for HIV. But syphilis is a different story, as this infection can be spread even with condom, just through the contact skin to skin.
Since your encounter with those prostitutes it's been already more than 3 months, so your test for syphilis will be accurate.
All the best.