Sex before period

I've been sex with my boy friend before my period and during my period it will be safe for me?