I think you are misled about what a yeast infection really is. A yeast infection isn't caused from sex, even though it can pass from person to person, it's not a Sexually Transmitted Disease or Infection.
You will not necessarily get a yeast infection 5 days after sex or even after sex. There are so many factors such as if your partner has a yeast infection, have you been using lube, are you allergic to the condoms that are being used. Those can all give you negative side effects after sex, and can make your body weaker and more likely to get a yeast infection. If your partner has a yeast infection, that will also need to be taken into account.
Please look at these posts to give you more information.