To do with the pill

If you have unprotected sex and your not sure if your pill is protecting you can you still get pregnant 2-3 days before your period?