when is it safe for sex

When I'm asking about when is it safe I mean to ask what times around the menstrual clock is ok. Like is safe to have sex a few days befor your period?