how long after sex do you have to wait to take a pregnancy test?

Emily
Please respond!