As specialmom said, the antibiotics used to treat UTIs can cause a rebound yeast infection, but it's really hard to get a yeast infection of the urinary system. Sexual intercourse can cause both, though. If it's just the outer area that hurts when you pee and you also itch, it's probably a yeast infection. If your urine is cloudy, you have a fever, and you have belly or low back pain, it's more likely a UTI (UTIs don't have to present this way though).