Help me

Hello guys.

is it safe to have protected sex 2days to my period. I really want to avoid pregnancy.