Question about the pill

Cathy
If you have unprotected sex when your on your pill and you don't think your protected can you get pregnant 2-4 days before your period??