Pregnant & period

Can you have unprotected sex 3 days before your period and be pregnant and have your period?