Safe days to have sex

Hello. Is it safe to have sex 2-3 days prior to your period? Just wanna make sure.